Hello markers, my request is quite clear :
Right after an API search call (HTTP module) in a database, I’m getting JSON bundle of results with collections that have always the same structure.
How to get the ID value in the following screenshot depending on Email nested value? In other words, IF email value is “test@gmail.com” in one of those collections, I want the ID value into this collection
On the second approach, you need to use an Iterator. which still needs to use map and get under the lteration.
I think this is enough for you is structure and keys are always same.
P.S.: Always search first, Check Make Academy. If this is helpful, mark it as a solution and Need expert help or have questions? Contact or comment below!
Ok @Garry_V,
Based on my last replay I’ve targeted your data array within Bundle 1.
If you’ve multiple bundles which are collections then first use Array Aggregator to combine them all in a single array. Then use Iterator and after that, with that iterator, you can easily use get and map.
If this is not what you want then please share some part of the input data.
HHOOOOOO that’s crazy!! It works. Thank you so much.
I didn’t know that filter between the Iterator and Array Aggregator works in that way. It’s not exactly the same filter as usual because it can let some data go on. So cool.
Well @dilipborad , so I started testing a bit further and unfortunatly, I got behavior I didn’t expect. Actually, I’ll use a router right after the Iterator.
In one way, IF email is in the collection like you suggested me :
Hello @Garry_V,
While you use a Router with multiple routes and using a condition it always goes to that route unless conditions are given and not matched.
Keep in mind that while you use Conditions in Make. Be sure about what type of data comes into that value part and select the condition operator according to a specific type. You can see there are multiple types of condition operators are there.
@dilipborad Fallback Router doesn’t work and I know why (thank you by the way, you taught me this option I didn’t know). As there are more than one bundle from the Iterator, 1st route filter check the condition only for the 1st bundle, if it doesn’t fit, it goes to the fallback route.
Hello @Garry_V,
I know that this is not a perfect solution but it helps to do further processes and setup the next steps.
Try this attached blueprint. JSON, Iterator, Route.json (9.8 KB)
In this basic example see the filters that look identical to what you set but also see the last step “Set Variable” where you get the direct ID of the matched item.
After that “Set Variable” you can do further operations.
@dilipborad well, your blueprint gave me ideas, so thank you. I made something not really “conventionnal” but it works so I use Text Aggregator Module, here it is :