Snippets
Split an array into separate items in Duaer
Duaer nodes run once per item. Split an order line list or an API array into one item per entry with Split Out so the next nodes handle each one.
Split an array with Split Out
- Add Split Out after the node that holds the array.
- Set Fields To Split Out to the array field, such as line_items; use data.items for nested paths.
- Under Include, keep No Other Fields, All Other Fields, or Selected Other Fields for a few, such as the order number.
- Select Execute step. You get one item per array entry.
When the field is text such as a,b,c, turn it into an array first in Edit Fields with {{ $json.tags.split(",") }}, type Array, then split.
Split with Code and keep parent fields
To rename fields or carry parent data at the same time, use Code (Run Once for All Items):
return $input.all().flatMap((item) =>
item.json.line_items.map((line) => ({
json: { order: item.json.name, ...line },
})),
);The reverse: combine items into one array
To combine items back into one array or one text, use Aggregate, or Append and Concatenate in Summarize.
Questions
After splitting in Duaer, how do I know which order each entry belongs to?
In Duaer Split Out, set Include to Selected Other Fields and keep the order number, or use the Code version on this page to copy parent fields.
Which Duaer node combines split items back?
Use the Duaer Aggregate node, or Append and Concatenate in Summarize.
In this section
Split a list into items with Split Out in Duaer
In Duaer, Split Out turns a list inside an item into separate items. Fields To Split Out is required. Include defaults to No Other Fields.
NodesAggregate items into one list in Duaer
In Duaer, Aggregate turns many input items into fewer outputs. You can collect selected fields, or pack the whole batch into one list.
DataUnderstand Duaer’s data structure
Understanding how Duaer structures and passes data between nodes is fundamental to building digital organizations. This guide covers the data structure format and how data flows.
SnippetsGroup, sum, and count items in Duaer (like a pivot table)
In Duaer, the Summarize node groups items by region, customer, or category and returns sums, counts, and averages without code.