---
title: Convert List To JSON Output
slug: convert-list-to-json-output
docTags: 
createdAt: 2021-12-22T07:13:36.000Z
---

Convert a JSON Object List to JSON using the values of the input list and substitution defined in the output template. It works similarly to the [Convert List To JSON (Based on Values)](docId:4x7Sw087pTUlU2_BkdN7G) API except that you can work with multiple property definitions in your output.



### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/list/tojsonoutput",
  "name": "Convert List to JSON Output",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "m7IPEq52KYRM6IA66pYLJ",
        "code": "{\n    \"output\": {\n        \"property1\": \"value1\",\n        \"question1\": \"answer1\",\n        \"property2\": \"value3\",\n        \"question2\": \"answer2\"\n    },\n    \"size_in_bytes\": 331.0\n}",
        "language": "200"
      },
      {
        "id": "kxpw-BOTV_qAO5LuQhxyh",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "m7IPEq52KYRM6IA66pYLJ"
  },
  "examples": {
    "languages": [
      {
        "id": "6Yq5ApU07EX8G2XQciJa2",
        "code": "{\n    \"input\": [\n        {\n            \"name\": \"property1\",\n            \"value\": \"value1\",\n            \"question\": \"question1\",\n            \"answer\": \"answer1\"\n        },\n        {\n            \"name\": \"property2\",\n            \"value\": \"value3\",\n            \"question\": \"question2\",\n            \"answer\": \"answer2\"\n        }\n    ],\n    \"output\": {\n        \"{{name}}\": \"{{value}}\",\n        \"{{question}}\": \"{{answer}}\"\n    }\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "6Yq5ApU07EX8G2XQciJa2"
  },
  "description": "Call the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::




### &#xD;&#xA;&#xD;&#xA;

