Input two arrays and output one array of new records

I’m getting two arrays of data, one from Jira and one from Pipedrive. I want to compare the two arrays and only keep an array of new records (new Pipedrive deals) so I can add them to a custom field in Jira.
My current setup uses an Iterator to go over each record in array1 and check if it exists in array2. This works perfectly, however, this is causing me to use over 3000 operations per execution. Any way to do this in one go?

Current setup: Imgur: The magic of the Internet

Thank you!

I am wondering to see why you are using the Create JSON module. Also, as the filter doesn’t consume operations, you can put Contains function to compare the Array.

Then you can aggregate the passed records (almost 2897) using Array Aggregator module and pass them as bulk update to JIRA.

This way it would consume significantly less operations.

However, this is a tricky implementation so will need access to your scenario.

Hi, I’m using the JSON module to get structure in my Aggregators.
Won’t the contains function only export the records that are in both arrays? I need the opposite, a “does not contain” function.

That’s fine, because Contains function gives a Boolean output. So it’d the record doesn’t exists then it will return false

1 Like

I fixed the # operations issue by using an Aggregate to JSON instead of Create JSON. Now only using 1 operation. Thanks for the help Manish.