I’m trying to gather all of the “url” fields from every collection in my array (of which there may be any number of collections). The screenshot here (and json file) shows the format.
I’ve attempted to output and map the “generated_images” “url”, but I can only seem to ever pull the values from the Collection 1 of the “image_gen_results” array.
I’ve tried to iterate and aggregate the data, but it doesn’t seem to get me anywhere as the collection is still broken out separately and won’t pull all of the “url” fields in a single list.
My output needs to be in a JSON list with the “url1”,“url2”,…“url8” etc.
I’ve successfully done this for all the URLs in the first collection, just can’t get the 2nd along with them. Any help would be appreciated.
Which formula have you used to map() this @mattb ?
I don’t fully get how your input JSON would look like, but if I understand it correctly you want to map the same variable name with an infinite amount of that value.
In this case, you first need to map all the arrays which are within the results array. Once you have all these arrays, you can then again map() that array to retrieve the URLs:
@mattb For the next challenge you face (you will always have a next one haha), try going step by step and checking the data output.
In my screenshot you can also see I create multiple varriables starting from the first map, then a flatten, and then another map. This way you can debug easier