Skip to main content

flatten Command

The flatten command combines groups of elements from the input stream into a stream of individual elements, preserving their original order.

Usage​

flatten

Examples​

> json [[1, 2], 3, [4, 5]] | flatten
​1
​2
​3
​4
​5
An already flat stream of elements would be unchanged
> json [1, 2, 3, 4, 5] | flatten
​1
​2
​3
​4
​5