Just noticed that Make has added two very useful array functions:
โ
arrayIntersect()โ
arrayDifference()
At first glance they seem simple, but they can eliminate a lot of routers, iterators, filters, and custom logic that many of us have been building manually.
Example Use Case: Order Fulfillment
Imagine you receive two JSON datasets:
Orders
[
{"ProductNumber":"P1001"},
{"ProductNumber":"P1002"},
{"ProductNumber":"P1003"},
{"ProductNumber":"P1004"}
]
Warehouse Inventory
[
{"ProductNumber":"P1003"},
{"ProductNumber":"P1004"},
{"ProductNumber":"P2001"},
{"ProductNumber":"P2002"}
]
If you want to get the product number that is in both in Orders and Warehouse Inventory you could use
โ
arrayIntersect()
OUTPUT :
P1003
P1004
Or if you want the product number that is in the first Array you choose (Eg : Orders) and not in the second array (Eg : Warehouse Inventory) you could use
โ
arrayDifference()
P1001
P1002
Why This Is Useful
Some quick automation ideas:
๐น Compare ERP products vs Warehouse stock
๐น Find customers present in CRM but missing in Mailchimp
๐น Compare Leads from two systems
๐น Match employee records between HR and Payroll systems
๐น Find invoices not yet paid
๐น Compare Shopify orders against fulfillment records
๐น Detect missing records during data migrations
Previously, I would typically use iterators, filters, aggregators, or custom JavaScript for these scenarios. Now it can be done with a single function.
Small update, but definitely one of those features that will simplify a lot of real-world automation workflows.
Looking forward for your thoughts on this !