Split a list into an array (like a spreadsheet )

Hi, I want to split this list at every fifth element to create some sort of a table which I will need to search and filter later on.
I searched the fourms but could’nt find a solution.

{
"data": [
"D001",
"customer 1",
"A1",
"1",
"$ 1,500.00",
"D002",
"customer 2",
"B2",
"2",
"$ 1,609.00",
"D003",
"customer 3",
"B1",
"1",
"$ 4,517.00"
]
}
]

the result should be something like this

code name zone count total
D001 customer 1 A1 1 $1,500.00
D002 customer 2 B2 2 $1,609.00
D003 customer 3 B1 1 $4,517.00

You’ll need to use the Function node for that. Something like:

2 Likes

I got this error:
ERROR: All returned items have to contain a property named “json”! [Line 104]

What version of n8n are you running? Newer versions don’t require items to have the extra JSON key/object in.

Try this which adds the json key/object in:

1 Like

Thanks for your help I updated to latest now its working.