Skip to main content

Map List

Uncontrolled node

Overview

The Map List node applies a transformation pattern to each item in a list and returns a new list with the transformed values.

This is useful for formatting data, applying logic across a collection of values, or modifying structure—without writing full code blocks.

Inputs

InputTypeDescriptionDefault
ListListA list of items (e.g., text, number, boolean, dictionary) to transform-

Outputs

OutputTypeDescription
OutputListA new list of transformed values based on the pattern

Panel Controls

The right-side panel includes a Pattern field, where you can define a Python-style transformation for each list item using the variable value.

Example

If your list is:

"hello", "world"

and the pattern is: value[:3]

The output will be:

"hel","wor"

Example: Mapping into Dictionaries with Index

You can return a dictionary from each list item using both value and index.

Pattern: {"a": value, "b": index}

If your list is:

"apple", "banana"

Then the output will be:

[{"a": "apple", "b": 0}, {"a": "banana", "b": 1}]

You can then use the Get Value node with a path input like:

0.a

To retrieve "apple" from the first mapped object, or:

1.b

To retrieve 1 (the index of "banana").

Tip

The value keyword refers to the current item in the list. You can use Python syntax like value.upper(), len(value), value["key"], etc. Use value to access the item, and index to reference its position in the list. Combined with the Get Value node, this enables precise referencing and extraction from mapped lists.