.first in swift code example
Example: swift first where
if let firstMatch = yourArray.first(where: {$0.id == lookupId}) {
print("found it: \(firstMatch)")
} else {
print("nothing found :(")
}
if let firstMatch = yourArray.first(where: {$0.id == lookupId}) {
print("found it: \(firstMatch)")
} else {
print("nothing found :(")
}