Converting json data from one format to another

Hello, I am facing some difficulties with regards to javascript in converting my data.

may i know if there is any method in converting from array in picture (1) to array as shown below. ?

target array format as following

[
{
"data":
[
[
"Date",
"Customer Name",
"Purchase Item",
"Quantity",
"Price"
],
[
"14-Oct-2022",
"Super 1",
"Rubber",
5,
10
],
[
"14-Oct-2022",
"Super 2",
"Pencil",
4,
20
],
[
"14-Oct-2022",
"Super 3",
"Paper",
3,
30
],
[
"14-Oct-2022",
"Super 4",
"Ruler",
2,
40
]
]
}
]

Hi @Benjamin123, something like this would do the job:

Note that I have created this workflow on the current n8n version 0.198.2, you might need to upgrade your own instance before being able to run it.