In This Guide
Understanding the Problem
When you receive nested data from an API (like an e-commerce order containing an array of items), standard n8n nodes will process the entire array as a single item. If you want to perform an action (like sending an email or updating a database) for each individual item inside that array, you need to split it.
The Solution: Item Lists Node
The Item Lists node is designed precisely for this scenario.
Step-by-Step Configuration:
- Add an Item Lists node to your canvas.
- Set the Operation to Split Out Items.
- In the Field To Split parameter, enter the dot-notation path to your array. For example, if your JSON has
data.orders.items, type exactly that. - Ensure Include Other Fields is toggled On. This is crucial if you need parent properties (like the parent
order_id) preserved alongside each split item.
Expected Execution Flow
[
{
"order_id": "901A",
"item_name": "Laptop"
},
{
"order_id": "901A",
"item_name": "Mouse"
}
]
Your workflow will now inherently loop for each dictionary in the array. Every node placed after the Item Lists node will execute twice in this example - once for the Laptop and once for the Mouse.