Delete duplicate elements but leave one element

Just so that other people can find the correct solution I’ll link @awilliams solution here: