Answers for "swiftui get first array element"

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 "swiftui get first array element"

Code answers related to "Swift"

Browse Popular Code Answers by Language