Mapping Array of Objects in Make.com: A User Guide

Hey there, fellow Make.com users! Today, I want to share a solution to a problem that some of you might have encountered. It's about mapping an array of objects to a simple array, specifically when you want to use the contains operator. Let's dive right in!

The Problem

So, you have a module that returns an array of objects, and you want to map it to a simple array. But, you can't seem to select the actual array; only its properties. What gives?

The Solution

Here's the thing: the first parameter of the map function should be the array itself, not plain text. But, if you're having trouble selecting the actual array, it's because every result (item/record) from a search module will output a bundle. To 'combine' them into a single structure, you'll need to use an aggregator.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. So, all you need to do is to use an array aggregator first, before setting up this filter.

Troubleshooting Tips

If you've previously used an iterator on the same module, you might think it already was an array. But, a bundle is something else. You can think of bundles as the number of times each subsequent module will run (not including the use of filters and filtered bundles), unless an aggregator combines them into a single bundle.

Summary

In conclusion, if you're having trouble mapping an array of objects to a simple array, remember to use an aggregator first. This will combine your bundles into a single bundle, allowing you to select the actual array. Happy Making!

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.