I have an array with Contact objects inside.
Then I have another array with Users.
class Contact: NSObject {
var name: String?
var phoneNumber: String?
var phoneNumberFormatted: String?
init(name: String, phoneNumber: String?, phoneNumberFormatted: String) {
self.name = name
self.phoneNumber = phoneNumber
self.phoneNumberFormatted = phoneNumberFormatted
}
}
class User: NSObject {
var name: String?
}
How can I remove a Contact object from the [Contact]
if I have a User in my [User]
with a matching name?
I know how to do it through loops but what is most efficient way?