Question : swift first where
Answered by : mobile-star
if let firstMatch = yourArray.first(where: {$0.id == lookupId}) { print("found it: \(firstMatch)")
} else { print("nothing found :(")
}
Source : | Last Update : Fri, 14 Feb 20
Answered by : mobile-star
if let firstMatch = yourArray.first(where: {$0.id == lookupId}) { print("found it: \(firstMatch)")
} else { print("nothing found :(")
}
Source : | Last Update : Fri, 14 Feb 20