Skip to main content
gardensurfer
Level 3
Aug 7, 2024 9:37 PM UTC
Question

How to loop thru collections nested in an array?

What is the right way to iterate through this structure (which is the output of an HTTP Request)? I want to iterate thru each variantAssayID in each collection of the array: 

 

 

I tried to use an iterator like this:

 

Instead of the iterator passing variantAssayID 1, then variantAssayID 2, then variantAssayID 3, the iterator just kept repeating variantAssayID 1 for as many times as there were collections in the array. 

 

Halp, please !?!?!?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

gardensurfer
Level 3
Aug 7, 2024 11:21 PM UTC

OP here. I figured it out (or at least a workaround). What I did was - in the HTTP Request module, I unchecked the box to Parse JSON, which is what created the "Collections within an Array" structure. 

 

I then took the raw JSON and passed it to a Parse JSON module, which then converted the JSON into bundles instead of collections. From there, I was able to iterate thru the bundles as desired. I can mark this one solved now, but please feel free to offer other ways I could have accomplished what I'd wanted. 

 

Thanks!

 

 

Translate
ChrisStephens
Community Advisor
Community Advisor
Aug 8, 2024 6:38 PM UTC

You should just need to put 141.Data in the iterator

Translate
gardensurfer
Level 3
Aug 8, 2024 6:43 PM UTC

Hmmm... I tried that first and it didn't seem to work. If I can free up some time I'll try it again. That certainly would be easier!

 

Translate