Answers for "swiftui find element in array with property"

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 "swiftui find element in array with property"

Code answers related to "Swift"

Browse Popular Code Answers by Language