Extracting values from a nested array (webhook response)

I cannot wrap me head around how to use the get and map function to retrieve values from this nested array. Could someone help me with an example for how extract the value 105. That would come from Collection:5, Iliria 98, id:1, sell:105.

Hi @Zbulo,

If you are sure that the key that you are looking for is always, Collection:5, Iliria 98, i.e it will always be in the fifth collection then you can simply do this,

{{first(map(get(1.data; “5.Iliria 98”); “sell”; “id”; 1))}}

If not, then you can try this blueprint to check the way to do it, it is unnecessarily complex, cause I just quickly did it.

{{first(map(flatten(remove(map(1.data; “Iliria 98”); null)); “sell”; “id”; 1))}}

blueprint (59).json (11.8 KB)


Thanks @Runcorn! The collection remains the same so I went down the easy route. :slight_smile:

I’m still struggling to wrap my head around how this works though. For my own understanding:

  1. Get: Selects the collection. I’m surprirsed you need both the collection number AND name.
  2. Map: Returns the value of sell where the filter key matches the array.
  3. First: What does this one do, only return the first result of the match?