You can convert to a Set
and back to an Array
again quite easily:
let unique = Array(Set(originals))
This is not guaranteed to maintain the original order of the array.
You can convert to a Set
and back to an Array
again quite easily:
let unique = Array(Set(originals))
This is not guaranteed to maintain the original order of the array.