Studio
  • Why Studio?
  • Getting Started
  • Setting up Studio
    • Import from Tokens Studio for Figma
    • Import from Figma variables
  • Connect Studio to Figma
    • Using Tokens Studio for Figma
    • Using Companion by Tokens Studio
  • Connect Studio to Code
  • Platform
    • Features
      • Tokens
        • Token Sets
        • Token flow
      • Themes
        • Theme Groups and Theme Options
      • Configuration
      • Releases
    • Platform
      • Accounts
      • Organisation
      • Project
      • API keys
      • Inviting members
  • GRAPH ENGINE
    • Introduction
    • Editor
    • Creating a Graph Based Set
    • Nodes
    • Types
    • Editing
    • Available Nodes
      • Accessibility
        • Color Blindness
      • Array
        • Array Filter
        • Array Find
        • Arrify
        • Concat
        • Flatten
        • Index Array
        • Inject Item
        • Array Length
        • Array Push
        • Remove Item
        • Replace Item
        • Reverse Array
        • Slice Array
        • Sort Array
        • Array Map
      • Color
        • Color To String
        • Color Wheel
        • Contrast
        • Contrasting Alpha
        • Contrasting Color
        • Contrasting from Array
        • Convert Color
        • Create Color
        • Darken Color
        • Deconstruct Color
        • Delta E
        • Distance
        • Flatten Alpha
        • Lighten Color
        • Match Alpha
        • Mix Colors
        • Name Color
        • Poline
        • Range
        • Scale Colors
        • Sort Colors By Distance
        • String To Color
      • CSS
        • CSS Accessible Clamp
        • CSS Box
        • CSS Function
        • CSS Map
      • Curves
        • Bezier Curve
        • Construct Float Curve
        • Deconstruct Float Curve
        • Flip Float Curve
        • Preset Bezier Curves
        • Sample Array from Float Curve
        • Sample Curve
        • Sample Float Curve
      • Design Tokens
        • Array To Set
        • Create Border
        • Create Border Design Token
        • Create Box Shadow
        • Create Box Shadow Design Token
        • Create Design Token
        • Create Reference
        • Create Typography
        • Create Typography Design Token
        • Destruct Token
        • External Token Set
        • Extract Token
        • Flatten Token Sets
        • Group Tokens
        • Inline Tokens
        • Invert Token Set
        • Leonardo Color
        • Leonardo Theme
        • Name Tokens
        • Preview Typography
        • Resolve Tokens
        • Set To Array
        • Ungroup Tokens
        • Group Token Array
        • Ungroup Token Array
      • Figma
        • Code Syntax
        • Publish Varibales
        • Scope All
        • Scope by Type
        • Scope Color
        • Scope Number
        • Scope String
      • Generic
        • Constant
        • Delay
        • Input
        • Object Merge
        • Note
        • Object Path
        • Objectify
        • Output
        • Panic
        • Passthrough
        • Subgraph
        • Time
      • Gradient
        • Gradient Stop
      • Logic
        • And
        • Compare
        • If
        • Not
        • Or
        • Switch
      • Math
        • Absolute
        • Add
        • Add Variadic
        • Ceiling
        • Clamp
        • Closest Number
        • Cosine
        • Count
        • Difference
        • Divide
        • Divide Variadic
        • Evaluate Math
        • Exponentiation
        • Floor
        • Fluid
        • Lerp
        • Modulo
        • Multiply
        • Multiply Variadic
        • Power
        • Random
        • Range Mapping
        • Round
        • Sine
        • Snap
        • Square Root
        • Subtract
        • Subtract Variadic
        • Tangent
      • Preview
        • Color Compare
        • Color Scale
        • Color Swatch
        • Math Expression
        • Number
        • Preview Curve
      • Search
        • Find First Match
        • Linear Search
      • Series
        • Alternating Series
        • Arithmetic Series
        • Exponential Decay
        • Fibonacci Series
        • Geometric Series
        • Harmonic Series
        • Inverse Linear Mapping
        • Linear Space
        • Power Series
      • String
        • Case Convert
        • Interpolation
        • Join Array
        • Lowercase
        • Normalize
        • Pad
        • Regex
        • Replace
        • Split String
        • Stringify
        • Uppercase
      • Typography
        • Base Font Size
      • Typing
        • Assert Defined
        • Has Value
        • Parse Number
        • Parse Unit
        • Pass Unit
      • Vector2
        • Create
        • Destructure
      • Naming
        • Alphabetic Scale
        • Alphanumeric Scale
        • Greek Letter
        • Hierarchy Level
        • Numeric Scale
        • T-Shirt Size
  • PLUGINS
    • Tokens Studio for Figma Plugin
    • Companion by Tokens Studio
    • Tokens Studio for Framer Plugin
Powered by GitBook
On this page
  • What It Does
  • Inputs
  • Outputs
  • Inner Graph Special Inputs
  • Inner Graph Required Output
  • How to Use It
  • Tips
  • See Also
  • Use Cases
Edit on GitHub
  1. GRAPH ENGINE
  2. Available Nodes
  3. Array

Array Map

PreviousSort ArrayNextColor

Last updated 5 days ago

What It Does

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.

Inputs

Name
Description
Type
Required

array

The list to process each item

List

Yes

Dynamic inputs

Any inputs you add to the inner graph will appear here

Varies

No

Outputs

Name
Description
Type

value

The resulting list after processing each item

List

Inner Graph Special Inputs

Name
Description
Type

value

The current array item being processed

Any

index

The current position in the array

Number

length

The total length of the array

Number

Inner Graph Required Output

Name
Description
Type

value

The transformed value to include in the result array

Any

How to Use It

  1. Drag the Array Map node into your graph.

  2. Connect your list (like [2, 4, 6, 8, 10]) to the "array" input.

  3. Click on the 'Subgraph Explorer' the node to open the inner graph editor.

  4. Inside the inner graph, build your transformation logic using the "value" input.

  5. In this example we connect the "value" to a "Multiply" node and multiply by 100.

  6. Connect your transformed result to the "value" output on the Output node.

  7. 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.

Tips

  • 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.

See Also

Use Cases

  • 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.

Array Filter
Array Find
Array Map Example