Array Map
Last updated
Last updated
Transforms each item in a list by applying the same operations to every element. It runs a mini-graph for each item in your list and collects the results into a new list of the same length.
array
The list to process each item
List
Yes
Dynamic inputs
Any inputs you add to the inner graph will appear here
Varies
No
value
The resulting list after processing each item
List
value
The current array item being processed
Any
index
The current position in the array
Number
length
The total length of the array
Number
value
The transformed value to include in the result array
Any
Drag the Array Map node into your graph.
Connect your list (like [2, 4, 6, 8, 10]
) to the "array" input.
Click on the 'Subgraph Explorer' the node to open the inner graph editor.
Inside the inner graph, build your transformation logic using the "value" input.
In this example we connect the "value" to a "Multiply" node and multiply by 100.
Connect your transformed result to the "value" output on the Output node.
Return to the main graph, right click on the "Array Map" and click on "Force Execute" to ensure the inner graph is run on each item in the array. The output will be an array with the operation done on each item in the array.
The inner graph runs once for each item in the array, in order.
You can add your own inputs to the inner graph's Input node, which will appear as inputs on the main Array Map node.
Use "index" inside the inner graph to access the position of the current item being processed.
The resulting array will always have the same length as the input array.
Color Palette Generation: Transform a list of base colors by applying the same adjustments to each.
Scaling Values: Convert all measurements in a list by applying the same mathematical operations.
Token Transformation: Process each design token in a collection to add or modify properties consistently.
: For selecting only specific items from a list rather than transforming all of them.
: For finding a single item in an array based on custom criteria.