Mastering Data Extraction from Nested Arrays on Make.com

Have you ever found yourself stuck trying to extract a specific value from a nested array in a webhook response? You're not alone. This is a common challenge that many Make.com users face. But don't worry, we've got a solution for you.

The Problem

Let's say you're trying to retrieve a specific value from a nested array. For example, you want to extract the value 105 from Collection:5, Iliria 98, id:1, sell:105. It might seem complicated at first, but with the right approach, it's actually quite straightforward.

The Solution

If you know that the key you're looking for is always in the same place (in this case, Collection:5, Iliria 98), you can use the following formula:

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

But what if the key isn't always in the same place? In that case, you can use this more complex blueprint:

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

Troubleshooting Tips

If you're still having trouble understanding how this works, here's a breakdown:

  1. Get: This function selects the collection. You need both the collection number and name.
  2. Map: This function returns the value of sell where the filter key matches the array.
  3. First: This function only returns the first result of the match.

Conclusion

Extracting values from a nested array in a webhook response doesn't have to be a headache. With the right functions and a little bit of patience, you can easily retrieve the data you need. Remember, practice makes perfect. So keep experimenting and you'll get the hang of it in no time.

You do have further questions?

Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.