Skip to main content

Iterator: Map

Run a sub-graph once per element of an input list and collect the transformed elements into a new list. Mirrors JavaScript's Array.prototype.map.

Inside the iterator scope, the auto-created Iterator::Entry exposes the current el and 0-based index; the auto-created Iterator::Collect reads the transformed element on collect to build the output list.

Example
Input: [1, 2, 3]
Body: el → el * 10
Output: [10, 20, 30]

Parameters

This function has no parameters.

Input

ArrayREQUIRED

List to iterate over (Array or JSON array).

Value

Optional value injected into every iteration as value on the entry node.

Output

Array

List of the per-iteration outputs collected from Iterator::Collect.