
Announcements
Hello
I have created a flow that generates two array outputs, im trying to compare them and if they are the same I wish to update a sharepoint list item. Basically is "Array 1" equal to "Array 2" (the listed items can also be in a different order), So far all i can find are methods to compare and then create a list of what the differences are ?
Cheers
Hi @fosso ,
A simpler way to do this would be to use the "intersection" expression to create an array with common elements between two arrays, then we can compare the length of the generated array - if the generated array length is equal to the length of either array - then both arrays have same elements!
Here's a breakdown of the if conditions,
If,
1. Length of two arrays should be equal
2. Length of the intersection of arrays is equal to the length of either array
then
Both arrays are the same!
else
Both arrays are different!
Hope this helps 🙂
Kind Regards,
Shaik Sha
________________________________________________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.