---
title: Convert List Format
slug: convert-list-format
docTags: 
createdAt: 2021-12-22T07:13:36.000Z
---

Convert a list from one format to another

| Processing Rule            | Description                                                                            |
| -------------------------- | -------------------------------------------------------------------------------------- |
| drop\_nulls                | Will remove all values from the JSON where the value is null                           |
| replace\_empty\_with\_null | Will replace all JSON property values that have and empty string ("") with ***null***  |
|                            |                                                                                        |

### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/list/tolist",
  "name": "Convert List Format API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "m7IPEq52KYRM6IA66pYLJ",
        "code": "{\n\t\"output\": [{\n\t\t\"emailAddress\": \"john.doe@domain.com\",\n\t\t\"fullName\":\"John Doe\"\n\t}, {\n\t\t\"emailAddress\": \"jane.doe@domain.com\"\n\t}]\n}",
        "language": "200"
      },
      {
        "id": "kxpw-BOTV_qAO5LuQhxyh",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "m7IPEq52KYRM6IA66pYLJ"
  },
  "examples": {
    "languages": [
      {
        "id": "6Yq5ApU07EX8G2XQciJa2",
        "code": "{\r\n\t\"input\": [{\r\n\t\t\"email\": \"john.doe@domain.com\",\r\n\t\t\"name\":\"John Doe\"\r\n\t}, {\r\n\t\t\"email\": \"jane.doe@domain.com\"\r\n\t}],\r\n\t\"output\": {\r\n\t\t\"emailAddress\": \"{{email}}\",\r\n\t\t\"fullName\": \"{{name}}\"\r\n\t},\r\n\t\"rule\": {\r\n\t\t\"drop_nulls\": true,\r\n\t\t\"replace_empty_with_null\":true\r\n\t}\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "6Yq5ApU07EX8G2XQciJa2"
  },
  "description": "Call the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::




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



