Non duplicate numbers from array

Hi all,

How to find non duplicate numbers from array without using loops.

Regards,
Venkatesh

Assuming this is an array <T> (such as integer)

assign newArray = array.Distinct().ToArray()

Cheers

1 Like

How to display list of non duplicated numbers in array

After Mp clarification, could you try

arr.GroupBy(Function(i) i ).Where(Function(g) g.Count() =1).Select(Function(s) s(0)).toArray()

s(0) can be replaced by s.key as well

Cheers

Hey @venkateshmenta

Yes Flow this will work. a minute difference :stuck_out_tongue:

array find unrepeatative vallues.xaml (15.3 KB)

Explanation:- In the above just first we are grouping arrray same elements in a group by using GroupBy Then By using Where with lambda Expression we are just checking the group count if it is only one.
then selection and getting value by using array index :slight_smile:

In the above have For each loop and without loop like @Florent_Salendres same attached :slight_smile:

Regards…!!
Aksh

1 Like