Array To Set
Last updated
Last updated
The Array of Tokens to Set node converts a flat array of tokens into a hierarchical token set structure. It transforms a simple list of tokens into a nested object structure, organizing tokens based on their names.
Tokens
A flat array of design tokens
List
Yes
Token Set
A hierarchical collection of tokens organized by their names
Object
Drag the Array of Tokens to Set node into your graph.
Connect an array of tokens to the "Tokens" input.
The node will organize the tokens into a hierarchical structure based on the name properties of each token.
Use the resulting token set with nodes that require structured token collections.
Token names with periods or slashes (e.g., colors.primary
or colors/primary
) will be converted into nested objects in the resulting set.
This node is useful for preparing tokens for export to file formats that expect a hierarchical structure.
All token metadata is preserved during the conversion process.
Token set to token array: For converting in the opposite direction.
Group: For more customizable grouping operations on token arrays.
Token Export Preparation: Convert a processed list of tokens back into a structured format for export.
Token Organization: Automatically organize a flat list of tokens into a logical hierarchy.
Token Structure Rebuilding: Restore hierarchical structure to tokens that have been flattened for processing.