RogerM
March 12, 2025, 4:06pm
1
Hi there,
I want to compare 2 arrays to extract the difference and store this in a new array. This is possible if i compare each single value (with iterations). But this takes a lot operations. Is there a compare array function which gets me the wanted result or another way which will use less operations?
Example:
Array 1
a, b, c, d
Array 2
a, b, d
Result
c
@RogerM
Hi, I have attached a blueprint for your reference so that you can import it into your own environment and check it.
blueprint_Compare two arrays and extract the difference.json (9.0 KB)
As a precaution, the Blueprint assumes that the elements contained in the shorter of the two arrays are always contained in the longer array.
Welcome to the Make community!
Yes, that is possible. You’ll need a minimum of ONE module:
This is just an example. Your final solution may or may not look like this depending on your requirements.
Example Input:
OR (works either way depending on which array is longer)
Example Output
Hope this helps! Let me know if there are any further questions or issues.
— @samliew
P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.
RogerM
March 17, 2025, 11:29am
5
thanks for the help, i will test asap