This is official answer to find index of specific object, then you can easily remove any object using that index :
var students = ["Ben", "Ivy", "Jordell", "Maxime"]
if let i = students.firstIndex(of: "Maxime") {
// students[i] = "Max"
students.remove(at: i)
}
print(students)
// Prints ["Ben", "Ivy", "Jordell"]
Here is the link: https://developer.apple.com/documentation/swift/array/2994720-firstindex