if array.contains(where: {$0.name == "foo"}) { // it exists, do something } else { //item could not be found }