For advanced array processing beyond simple mapping, use Iterator and Aggregator logic processors to apply complex transformations to each item, filter items based on dynamic conditions, perform calculations on each item separately, and combine results after processing.
loopOverItems
Quick mapping for simple arrays
Iterator & Aggregator
Advanced processing for complex scenarios
Iterator & Aggregator Flow
How Iterator Works
Iterator splits an array into individual objects, allowing each item to be processed separately through the flow.
What happens:
Iterator receives the array from the source
Splits the array into separate objects
Each object flows through subsequent operations
Each item is processed independently
How Aggregator Works
Aggregator combines individual objects back into a single array after each item has been processed.
What happens:
Receives processed objects from Iterator
Combines them into a single array
Outputs the complete array to the next operation
Nested Arrays Example
Source data contains arrays inside arrays with line items need to use a two-level Iterator strategy.
Input:
{
order: "ORD-001", customer: "Alice",
items: [
{ sku: "A", price: 100, qty: 2 },
{ sku: "B", price: 50, qty: 1 }
]
},
{
order: "ORD-002", customer: "Bob",
items: [
{ sku: "C", price: 200, qty: 3 }
]
}
]
Two-level Iterator strategy
Outer Iterator
Loops over orders
Loop 2 → ORD-002 (Bob)
Inner Iterator
Loops over each order's items[]
ORD-001 → sku:B (qty:1, $50)
ORD-002 → sku:C (qty:3, $600)
Inner Aggregator → Outer Aggregator
Inner collects line totals per order. Outer recombines all orders into the final array.
Output:
{ order: "ORD-001", customer: "Alice", orderTotal: 250 },
{ order: "ORD-002", customer: "Bob", orderTotal: 600 }
]

When to Use What
| Situation | Use | Why |
|---|---|---|
| Extract a single field from all items | loopOverItems | Simple mapping, no per-item logic needed |
| Calculate a value per item (price × qty) | Iterator & Aggregator | Each item needs its own computation step |
| Filter items by a condition | Iterator & Aggregator | Use a Router or Filter node between them |
| Call an API once per item | Iterator & Aggregator | Each item triggers an independent HTTP call |
| Process nested arrays | Iterator & Aggregator | Nest a second Iterator inside the first |
Related Topics
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article