I used the solutions given here: Delete a specific array element equal to a string - quickly ask a question
this is one of the solutions there (in case the object was a string):
myArrayOfStrings = ["Hello","Playground","World"] myArrayOfStrings = myArrayOfStrings.filter{$0 != "Hello"} print(myArrayOfStrings) // "[Playground, World]"
nyxee
source share