Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Treatment push

json/value::push


Inputs

⇥ array: Stream<Json> (json::Json)
⇥ value: Stream<Json> (json::Json)

Outputs

↦ json: Stream<Json> (json::Json)


Emit each JSON array of array with the value of value coming with it added at its end.

Values that are not JSON arrays are emitted unchanged.

graph LR
     T("push()")
     A["[🟨] … []"] -->|array| T
     V["🟦 … 🟦"] -->|value| T
     T -->|json| B["[🟨, 🟦] … [🟦]"]

     style A fill:#ffffff,stroke:#ffffff
     style V fill:#ffffff,stroke:#ffffff
     style B fill:#ffffff,stroke:#ffffff