Prism · Arrays

$flatten

Flattens an array of arrays by one level. An element that is not an array is kept as it is.

The source
{ nested: [[1, 2], [3], 4, [5, [6]]] }
The config
{ $flatten: { $ref: '$.nested' } }
What comes out
[1, 2, 3, 4, 5, [6]]
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.