Remove array inside another array

Hi there! Just curious on how can I remove an array inside an array? I am trying to make this:
image
only look like this:
image
Thanks!

because as of now it looks like this when i am trying to access the data:
image
but i want it to be like this:
image
just so i could transfer the data to mysql node easily
Thanks!

Hey @gnik31!

You can use the Function node for that. Note that the Function node returns an array. Sharing a code snippet with you that might help

var newArr = []
// code to transform/extract the data
newArr.push({json: {Key1: value1, Key2: value2}})

return newArr

Please let us know if you have any other questions. You can read more about the data structure in n8n here

Hope this helps!

1 Like

Will try this @harshil1712! Thank you so much!

1 Like

Made it! Thank you so much! @harshil1712
image

1 Like

Awesome! I am glad it is solved!

Have fun!

1 Like