[WooCommerce] Iterator looking at wrong collection

I’ve got data in several arrays I need to iterate. Notice that in line items (array), in meta data (array) there are then collections which hold values. The first array of meta data has a value that is ALSO an array. I need to iterate this. See that collection 1, the one I care about, the value is an array. Collection 9 is NOT an array, it’s just a value.

However, when I get down the line, when I check the iteration, it’s for some reason looking at collection 9 only: ergo, I’m not able to iterate the value since it assumes its just a value rather than an array.

I’ve tried using filters to pull only the first collection; no matter what I do, Make STILL assumes the data is from collection 9 and the value is not an array. How do I force Make to look at Collection 1 so that, when I iterate the arrayed value, I can then explore the details? Because at the moment, it always uses collection 9 as the example for mapping.

Bump - can anyone help?

Hey @Alex_Vrij
You can use this formula in a set variable module to get that particular meta data property
image

{{get(map(8.metaData; "value"; "id"; 34802); 1)}}

1 Like

This is simply giving me a null value? Really out of my depth here, sorry.

Ah, think I fixed it! I filtered for everything that didn’t have a key for the extra data (the collections with arrayed values), set the variable FIRST and THEN iterated that variable. I think eliminating all others via filter has just fixed it!

1 Like