I am trying to filter a NSArray which contains objects which are NSDictionary. This NSDictionary again contains NSDictionary inside it.
It looks something like this.
[
{
Comp_Name = {
text = "Quality Ace #5846-C";
};
ShipTo = {
text = 312025846;
};
SoldTo = {
text = 10000081;
};
},
{
Comp_Name = {
text = "Billington Ace Hardware - 5863K";
};
ShipTo = {
text = 312025863;
};
SoldTo = {
text = 10000081;
};
}
]
I want to filter this Array to some “text” which matches with object for “Comp_Name”.
Code that I am using is:
_filteredList = [_unFilteredArray filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"Comp_Name == %@", searchBar.text]];
Please help me getting a filtered list based on object “Comp_Name”, “text”.
@rmaddy – Thanks for help!!!
@"Comp_Name.text == %@"works just fine.