Hi,
I have two arrays:
I want to loop through the larger array with 20 items in it and see which one of those items match with the smaller array that has 5 items. So my desired output would be 5 match and 15 no match.
Hi,
I have two arrays:
I want to loop through the larger array with 20 items in it and see which one of those items match with the smaller array that has 5 items. So my desired output would be 5 match and 15 no match.
Try below expression two find matching values between two arrays.
arrMatch = arrMonthDates.Intersect(arrDataDates)
Hope arrMonthDates and arrDataDates variables of type Array of String.
Same error as above.
And they both are system array variable
Also, I should note that the 2nd array with 5 items is from a excel data table which is converted into an array
I tried the same expression from my end and can’t see any error. Please find the attached screenshot for your reference.
It should be of type System.String[] but not System.Array.
I switched and it worked. is there any way I can log the items that didn’t match also?
Yes its possible. Please try below expression.
arrNoMatch = arrMonthDates.Except(arrDataDates).ToArray
Thank you!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.