Get unique values in a Swift array Recently I was working on an IOS app in Swift language. I came through an issue that I was having an array. That array was filled with values on run time. Most of values were duplicate. So I need to get a unique array. In Swift I did