Creating individual object from array

Hello , i would like to create an object for individual array as shown below.

Original data
image

Transformed data
image

may i know which node do i use to convert the json array.

Item Lists node in split mode :+1:

1 Like

actually it is not splitting the array. It is adding individual array to a new array with “fields”

Hi @Benjamin123, looks like you can use the Set node here. Simply add a new field with a name of fields, as a value you can use an expression of {{ $json }}.

2 Likes

Hello @MutedJam , i get the result as below .

Huh, I did not expect this behaviour at all. Quickly testing this on [email protected], the approach seems to work fine using the below workflow:

Result:

Can you confirm which version of n8n exactly you are using and share a workflow using which the problem can be reproduced please?

i am using version 0.227. it says that i am 3 version behind.
maybe i will try to update the version first and try out again.

image

strange, when i try again, it works. anyway , thanks for the guide…

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.