var testarray = NSArray() testarray = [1,2,2,3,4,5,3] print(testarray) testarray.removeObject(2)
I want to remove single object from multiple matchi
If you want to remove all duplicate objects then you can use below code.
var testarray = NSArray() testarray = [1,2,2,3,4,5,3] let set = NSSet(array: testarray as [AnyObject]) print(set.allObjects)