Skip to main content

Iterator: Zip

Combine multiple input lists into a single list of tuples (each tuple is a JSON array). Wire each list to its own slot on the unlimited arr input.

By default the result is truncated to the length of the shortest input. Use Strict to fail instead, or Fill value to pad shorter inputs to the longest input's length ("zip longest").

Example
Inputs: [1, 2, 3], ["a", "b", "c"]
Output: [[1, "a"], [2, "b"], [3, "c"]]

Inputs: [1, 2, 3], ["a", "b"]
Default: [[1, "a"], [2, "b"]] (truncate)
Strict: error
Fill="?": [[1, "a"], [2, "b"], [3, "?"]] (pad)

Parameters

Strict

When enabled, fail the step if the input lists have different lengths. Takes precedence over Fill value: with both set, a length mismatch errors before any padding happens and the fill value is ignored.

Fill value

"Zip longest" mode — pad shorter inputs with this value to the longest input's length. When omitted, the default truncate behavior applies. In the editor this is a plain text field, so the padding value is always a string. Ignored when Strict is enabled.

Input

Arraysrequired

One or more lists, each wired to its own slot on the unlimited arr input. A single wired list yields a list of 1-tuples; wiring nothing fails with a MissingConnector error.

Output

Result

List of N-tuples (each tuple a JSON array containing one element from each input list at that index).