Extract an Item from Array | Get and Map Function | Make Beginners Guide

You are feeding an array with just 1 array element in metaData array, so get() or map() won’t work since they work best on an array with multiple array elements. To be more precise get() will be able to just select the first array element because there is only one in your array, or it can select metaData.value array but it won’t search it. map() won’t work either since there is only one array element and filtering will work on an array with multiple elememts.

What you have here is an array with a bunch of collections in it so it is best to simply iterate the array with the array iterator, filter and then select the item you need out of the iterator using a filter.

When I try to work with data structures I like to isolate the structure into a Parse JSON module which effectively generates the necessary output bundle(s) that I can work with. I simply wrapped your array structure in { and } to create a JSON structure:

The Parse JSON module you can see generates just 1 bundle with an array with 1 array item and 3 collections inside of it. The iterator simply iterates the array and each collection becomes a separate bundle that can now be filtered and treated individually.

Next I simply filter on the id in the module path to the next module, Set Variable.

This module sets the variable to what I want to extract out of the matching bundle that was filtered

Yielding the necessary result:

I am attaching the blueprint for you to experiment with on your own.
blueprint (8).json (5.3 KB)

Remember: get() and map() work on arrays and complex arrays with MULTIPLE array elements, NOT arrays with 1 array with multiple collections.

1 Like