#flatten
Returns a single array by recursively flattening an array of nested arrays.
#flatten(array)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
array |
path | array |
The nested array. |
Returns
Section titled “Returns”array
Examples
Section titled “Examples”Flatten nested arrays
Section titled “Flatten nested arrays”{ "nested": [ [ 1, [ 2 ] ], 3 ]}{ "result": "#flatten($.nested)"}{ "result": [ 1, 2, 3 ]}