Combine Data
Uncontrolled node
Overview
Merge two lists or objects into one value.
Combine Data joins two lists or merges two objects. It supplies the result when another node needs it and does not require an event trigger.
It combines values, not execution paths. Use event connections to ensure both source actions have produced their data before the result is consumed.
Inputs
| Input | Type | Description |
|---|---|---|
| data1 | Data | The first list or object. |
| data2 | Data | The second list or object. |
Outputs
| Output | Type | Description |
|---|---|---|
| output | Data | The combined list or object. |
Combination rules
| Inputs | Result |
|---|---|
| Two lists | A single list containing data1 followed by data2. Duplicates are retained. |
| Two objects | One object with both sets of properties. data2 wins when the same property exists in both. |
| A list and an object, in either order | An object containing the original properties and the list items under keys "0", "1", etc. List items overwrite conflicting numeric keys. |
| One list or object and one scalar or missing value | The list or object is returned; the other value is not appended. |
| Neither input is a list or object | An empty object, {}. |
Object merging is shallow: a property containing a nested object is replaced as a whole, not merged field by field.
Examples
Joining ["A","B"] and ["B","C"] produces ["A","B","B","C"].
Merging {"name":"Ada","status":"new"} with {"status":"ready"} produces {"name":"Ada","status":"ready"}.
To add one item to a list, first wrap that item in a one-item list. Connecting a plain text value alongside a list will not append it.