Answers for "swift find element with predicate"

1

swift first where

if let firstMatch = yourArray.first(where: {$0.id == lookupId}) {
  print("found it: \(firstMatch)")
} else {
  print("nothing found :(")
}
Posted by: Guest on February-07-2020

Code answers related to "swift find element with predicate"

Code answers related to "Swift"

Browse Popular Code Answers by Language