convert repeated item indices to unique indices

Hello, I have a list [2,3,1,5,6,7,10,2,4], and the corresponding indices are 0,1,2,3,4,5,6,7,8; but when item 2 is repeated, the index is also repeated and I get 0, how could I get to the index that corresponds to it?

If all you’re looking for are the keys (indices) …
keys

3 Likes

Hi @rendel5d32 ,

List.IndexOf only returns the first index of the item in the list. List.AllIndicesOf returns all indices of the item in the list.

1 Like