Skip to main content

Zip Lists

Uncontrolled node

Overview​

Combine named lists into a list of records.

Combine items at matching positions from several lists into records. The input names become the property names of each output record.

This node is evaluated when another node needs its output. It has no run or done event.

Inputs​

InputTypeDescription
DynamicList or dataOne socket for each name in inputNames. Connect a list, or a single value to repeat alongside the other inputs.

Properties​

SettingTypeDescription
inputNamesTextComma-separated input names, such as name,score. Names are trimmed and duplicates create only one socket. Changing a name can remove its existing connection.

Outputs​

OutputTypeDescription
outputListA list of objects keyed by input name. The number of records equals the longest supplied list. No supplied values, or only empty lists, produce [].

Unequal list lengths​

A shorter list repeats its last item until the longest list ends. A single value repeats for every output row. An empty list has no last value, so its field is undefined and may be absent when the result is saved as JSON.

If each list is meant to represent the same set of rows, check their lengths first. Zip Lists does not join records by ID or stop at the shortest list.

Example​

Set inputNames to product,quantity,region and connect:

  • product: ["Apple", "Banana", "Cherry"]
  • quantity: [10, 5]
  • region: "UK"

The result is:

[
{ "product": "Apple", "quantity": 10, "region": "UK" },
{ "product": "Banana", "quantity": 5, "region": "UK" },
{ "product": "Cherry", "quantity": 5, "region": "UK" }
]

The last quantity repeats for Cherry. Use Combine Data instead if you want to concatenate two lists end to end.