Deeply nested collections and arrays

Dear community,

I’ve been struggling for some time now to process a very complex collection. I retrieve the data of a metaobject from Shopify and iterate the node collection through the pages of the API response. However, the iterator only shows me the information about the bundles for mapping the data. I hope the screenshots help to understand the problem.

I really hope that someone can help me with this.

Kind regards
Lena

Hi @Lena_Sue

From what I can see on your screenshots, you are probably trying to iterate over node, which is a Collection, not an Array.

If you want to iterate over all node objects, try to map edges to the iterator. Then, use get() and map() functions to retrieve values from the node.

@damato

3 Likes

Thank you!! That’s exactly the information I needed. At the same time, I took another deep dive into the make academy and now I 've got it working.

2 Likes