Skip to content

Keyword array zip

Oliver Atkinson edited this page May 10, 2026 · 1 revision

array_zip

Combines arrays by position.

The output length is limited by the shortest input array.

Shape

{
  "{returns}": {
    "array_zip": {
      "together": [
        ["a", "b"],
        [1, 2]
      ],
      "flattened": false
    }
  }
}

Example

{
  "{returns}": {
    "array_zip": {
      "together": [
        ["a", "b", "c"],
        [1, 2]
      ]
    }
  }
}

The result is:

[
  ["a", 1],
  ["b", 2]
]

With "flattened": true, the result is ["a", 1, "b", 2].

Clone this wiki locally