Convert a JSON array of objects into CSV text. Supports field selection, nested object flattening, custom column mappings with expressions, and configurable delimiters.
The utility takes an array of objects and produces CSV text. Each object becomes a row, and object keys become column headers.
All fields from the first object determine the columns. Values are quoted when they contain the delimiter character.
Specify an array of field names to include only certain columns in a specific order.
When enabled, nested objects are flattened using dot notation. Arrays within cells are joined with a configurable delimiter.
Define custom columns with expressions using {{fieldName}} syntax. Allows combining fields, renaming columns, and applying transformations.
| Field | Type | Default | Description | |
|---|---|---|---|---|
| Delimiter | enum | , | Field separator: ,, ;, \t (tab), or `\ | ` (pipe) |
| Include Headers | boolean | true | Add column names as the first row | |
| Columns | json | [] | JSON array of field names to include (empty = all fields) | |
| Flatten Nested Objects | boolean | false | Flatten nested objects using dot notation keys (e.g., user.name) | |
| Array Delimiter | string | `\ | ` | Character to join array values within a single cell |
| Column Mapping | column-mapping | [] | Define custom column mappings with expressions. When configured, overrides Columns and Flatten settings. |
Custom mappings let you define exactly what each column contains:
Column: "Full Name" Expression: "{{firstName}} {{lastName}}"
Column: "Age" Expression: "{{age}}"
Column: "Location" Expression: "{{city}}"| Name | Type | Default | Description |
|---|---|---|---|
| Delimiter | enum | , | Character used to separate fields in the CSV output , ; \t | |
| Include Headers | boolean | true | Add column names as the first row |
| Flatten Nested Objects | boolean | false | Flatten nested objects using dot notation keys (e.g. user.name) |
| Array Delimiter | string | | | Character to join array values within a single cell |
| Columns | json | [] | JSON array of field names to include (empty = all fields) |
| Column Mapping (Advanced) | column-mapping | [] | Define custom column mappings with expressions. When configured, overrides Columns and Flatten settings. |
Convert this JSON to CSV.1[2 {3 "name": "Alice",4 "age": 30,5 "city": "New York"6 },7 {8 "name": "Bob",9 "age": 25,10 "city": "London"11 }12]1[]1name,age,city
2Alice,30,New York
3Bob,25,Londoncurl -X POST https://your-domain.com/api/v1/utilities/convert.json-to-csv \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":[{"name":"Alice","age":30,"city":"New York"},{"name":"Bob","age":25,"city":"London"}]},"config":{"delimiter":",","includeHeaders":true,"columns":[],"flattenNested":false,"arrayDelimiter":"|"}}'1name,age,city
2Alice,30,New York
3Bob,25,London