Map List
Uncontrolled node
Overview
Transform each list item with a JSON template.
Build a new value for each item using a JSON template. Use Map List to extract fields, rename fields or assemble records. The output retains the input order and has one item per input item.
This node is evaluated when another node needs its output. It has no run or done event.
Inputs
| Input | Type | Description |
|---|---|---|
| list | List | The list to transform. |
| Dynamic | Data | Template variables other than value and index can create extra sockets. For example, {{category}} adds a category input. |
Properties
| Setting | Type | Description |
|---|---|---|
| pattern | Code | JSON template for each output item. Use {{value}} for the current item and {{index}} for its zero-based position. |
Outputs
| Output | Type | Description |
|---|---|---|
| output | Data | Transformed list. An empty or missing pattern returns the input unchanged. An invalid template can return error text instead of a list. Empty lists and non-list inputs pass through unchanged. |
Template values
Place a placeholder outside quotes to preserve its type. Put it inside a JSON string when you want to build text. This is a data template, not Python or an arithmetic formula.
Given [10, 20], use:
{"amount": {{value}}, "position": {{index}}}
Output:
[
{ "amount": 10, "position": 0 },
{ "amount": 20, "position": 1 }
]
Extract a field
For [{"name": "Alex", "score": 7}, {"name": "Sam", "score": 9}], set pattern to:
{{value.name}}
The output is ["Alex", "Sam"].
To create a new record, use:
{"label": "Customer: {{value.name}}", "score": {{value.score}}}
This produces objects with text labels and numeric scores. Connect output to Show or another consumer; if the template fails, check for error text rather than assuming you received a list. There is no automatic fallback to the original list for a malformed template.