Remove all identical values and labels into a dropdown

I have a dropdown to select some first names of members participating to some events. One member can be registered to many events (say 5) and therefore his name will appear 5 times into the dropdown list. How can I eliminate the identical 4 and only show 1 such name in the list?
Thanks,

Hi,

You will need to create a filter function to find and eliminate duplicates.
The Array.filter() javascript method should help you achieve that.

Thanks Ido.
I actually have many filters yet set-up on the page (for first and last names, for events dates, …). But I cannot figure out the function to find duplicates. Could you kindly be a bit more detailed so I can make some attempts of code and evolve from there?
Thanks again
Eric