Nest 2 arrays

Hi,

I have the following data structure and would like to transform it

[
  {
    "letter":[
      "A",
      "B",
      "C",
      "D"
    ],
    "number":[
      "1",
      "2",
      "3",
      "4"
    ]
  }
]

TO

[
  {
    "letter": "A",
    "number": "1"
  },
  {
    "letter": "B",
    "number": "2"
  },
  {
    "letter": "C",
    "number": "3"
  },
  {
    "letter": "D",
    "number": "4"
  }
]

I have been searching for a solution for days but unfortunately without result.
Can anyone help me out with this? Thanks in advance!

Hi @tvdp,
welcome to the community :tada:

To transform 1 item with array fields to multiple items you could use the Code node like this:

Here is an example workflow to illustrate:

1 Like

Thank you so much! It works exactly as needed.

1 Like

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