Indexing and replacing duplicate items

Hello!
I am trying to replace duplicated items in a list by finding their index, and then replacing that index with a “DUPLICATE” string. The trouble seems to be that the index of node only takes the first index in of a duplicated item in a list each time it finds that element. What I need it to do is to take the first index and then move on to the next index the next time in finds that same point for my list reconstruction to work.
This would have to repeat like like this through an any number of items in a sublist. let me know if that makes sense.

Hey,

Sorry I tried to understand what you wanted, but realised there were a few possible things you were wanting…!

Maybe this is helpful?

Cheers,

Mark

duplicate.dyn (15.9 KB)

Hi @Mark.Ackerley! thank you for your reply! Its not quite what I wanted to do. Sorry maybe I explained it poorly. What I am experincing is a list of sublists, of varing lengths, ie: [{x}, {b, c}, {d, e}, {f,g, h}, {i, j,k,l}, {y}, {b, c}, {d,e}, {f,g,h}, {i, j,k,l}, {f,g,h}, {z}, {i,j,k,l}, {i,j,k,l}] notice how the sublists that repeat have the same number of sublists in the parent list, that is equal to the length of the sublist. ie {i,j,k,l} has 4 occurances in the list and is also 4 items long this is not a coincidence. what I want to do is use only the first occurance of each item and drop the rest for the list. So what i am looking for in the list above would be [{x}, {b}, {d}, {f}, {i}, {y}, {c}, {e}, {g}, {j}, {h}, {z}, {k}, {l}].

Sorry but I still don’t understand :frowning: perhaps you could make a simple dyn and some more diagrams?

Apologies,

Mark