Transforms
Flatten All
Overview
The Flatten All transformation flattens an entire JSON document into a single level structure. It handles both nested objects and arrays, using a specified delimiter to separate nested levels in the resulting keys.
Configuration
Code
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| delimiter | string | false | "_" | Character(s) used to separate nested levels in flattened keys |
Examples
Basic Object Flattening
Input:
Code
Output with delimiter: "_":
Code
Array Flattening
Input:
Code
Output with delimiter: "_":
Code
API
To create a Flatten All transform via the API:
Code
Notes
- The transformation flattens all nested structures in the document
- Array indices are zero-based in the flattened output
- Primitive values (strings, numbers, booleans) are left unchanged
- Null values are preserved in the flattened output
- Delimiter defaults to "_"
Last modified on