Answers for "swift find element in array"

0

find object in array by property swift

if array.contains(where: {$0.name == "foo"}) {
   // it exists, do something
} else {
   //item could not be found
}
Posted by: Guest on September-24-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language