Check per each element, so for the first element of Arr1 to the first element of Arr2 then to the second element of Arr1 to the second element of Arr2 and so on until the fourth element
First create one new array to write status. And then use nested ForEach loop to iterate two array.
ForEach item1 in Arr1
ForEach item2 in Arr2
IF item1.Tostring.Equals(item2)
Then use Add to Collection activity and pass "YES" and mention array name as Arr3
Else use Add to Collection activity and pass "NO" and mention array name as Arr3
If you need to compare the two arrays sequentially and does not require the results in a third array, then you can use SequenceEqual of String array methods.
If you need to ignore the cases then pass this parameter as well,
item - Current Item from my arrFirst inside the loop
arrSecond - Second Array
Since I need to compare the 1st element from first array with the 1st element in the second array
I have used this,
arrSecond(Array.IndexOf(arrFirst, item))
Getting arrSecond array 1 index item using “Array.IndexOf” method
so here in arrSecond(0) item I need to take, so I am getting the item index value from first array.
StringComparison.InvariantCultureIgnoreCase - this is to ignore the case sentive string comparision