📅  最后修改于: 2022-03-11 15:00:58.754000             🧑  作者: Mango
if let firstMatch = yourArray.first(where: {$0.id == lookupId}) {
print("found it: \(firstMatch)")
} else {
print("nothing found :(")
}