I'm currently working on a project where I get JSON responce which looks this way:
{"1":"qwerttt","2":"asdasda"}
I'm using Objective-c. I know how to filter data with the predicate knowing the key name. It could look like this:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"city contains[c] %@", searchText];
But I don't understand what should I write in this case when the key name is not the same for each pair. Should I write my own filter, create a special dictionary or array in a comfortable format or do something else?Any help would be appreciated.
Updated: This is what I get when I parse json

Try something like this:
[[_regions allValues] filteredArrayUsingPredicate:
[NSPredicate predicateWithFormat:@"SELF CONTAINS[c] %@",
"RegionImSearchingFor"]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With