kyle-c
11/19/2017 - 12:08 PM

Is in array

Check if an element is in array

let result = sourceArray.filter { $0.attributeCompared? == valueCompared }

if result.isEmpty {
  //not in array
}
else{
  //in array
}