How to look for duplicates in a bundle from a Array aggregator

My goal is to take the data from an Array Aggregator [Structure type Json] output bundle and compare LineID field. If LineID fields all match, I want it to return a number 0 [Zero], if LineID fields do not all match, I want it to return a number 1.

I have tried many modules and filters - I cannot figure out how to get Make to look at the bundle then the field in each collection.

Any help would be appreciated.

Hey!! Welcome to the Make community!!

You could aggregate the relevant LineId (or other fields as well and use this:

{{if(length(deduplicate(map(4.array; “lineId”))) = 1; 0; 1)}}

“lineId” has to be the raw name of the field


image

AND


image

Benjamin

1 Like

Hi Benjamin, Thank you for the assistance. I am going to try this out and see how it goes! Appreciate the help.

1 Like

Hey sorry I didn’t explain

  • it extract lineID in a new array
  • it removes all duplicates
  • if length of the new array is 1 it means all other lineIDs were duplicate (same value)
1 Like