Question

Nested arrays are converted into strings

  • 25 June 2021
  • 0 replies
  • 158 views

I have a simple nested array generated by a code action step (JS).

const array = [['dog', 'cat'],['zebra', 'giraffe']];

Now, I use a ‘Loop by Zapier’ step to loop through the top level arrays - but every iteration returns a string of the whole array:

dog,cat,zebra,giraffe

 

How do I get the actual subarrays in the loop?

 

Basically I want to be able to use the following:

First iteration:

[‘dog’, ‘cat’]

Second iteration:

[‘zebra’, ‘giraffe’]

 

Is this possible?


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.