Extract json and split in batches

Hello everyone !
I really like n8n and i encounter a challenge (for me, but for specialist, it should be easy…)

I have data from orders of woocommerce
each order have some lines of items.
I want to collect lines of items and then split in batch for each line
How to do this ?

the json has that structure :

[
{
"id": 1106,
"status": "processing",
"currency": "EUR",
"line_items": [
{
"id": 257,
"name": "xxx",
},
{
"id": 258,
"name": "yyy",
},
},
]

What i would want is to extract a json i could split in batch
Thank for your help

My configuration :
n8n : 0.132.0 (due to suitecrm node)

Hi @alang, this would be much simpler with more recent versions of n8n. They would come with the Item Lists node which makes splitting up your line_items property as simple as it gets.

However, you can also achieve this behaviour on [email protected] like so:

You’re the best ! it works perfectly !

I will update to more recent version as soon as i can replace old node suitecrm with http node (use of API)

Thanks again !

1 Like

You’re most welcome, glad to hear this works for you!