I want to check a value is there in section object.This code is working fine but if I write the complete name only it will get in to the filtered object.i need to get the filtered data when the search test matches with a substring in the string array
["A": ["Affenpoo", "Affenpug", "Affenshire", "Affenwich", "Afghan Collie", "Afghan Hound"], "B": ["Bagle Hound", "Boxer"]]
struct Objects {
var sectionName : String!
var sectionObjects : [String]
var sectionid:[String]!
var sectionph:[String]!
var sectionImage:[String]!
}
var objectArray = [Objects]()
var objectArrayFilter = [Objects]()
objectArrayFilter = objectArray.filter({$0.sectionObjects.contains(searchBar.text!)})