Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

find object in array by property swift

if array.contains(where: {$0.name == "foo"}) {
   // it exists, do something
} else {
   //item could not be found
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #object #array #property #swift
ADD COMMENT
Topic
Name
7+3 =