Swift primeiro onde

if let firstMatch = yourArray.first(where: {$0.id == lookupId}) {
  print("found it: \(firstMatch)")
} else {
  print("nothing found :(")
}
Mobile Star