I have the dictionary below and I would like to get access to all cities for a particular country. So if I select USA below, I want access to Dallas, Houston. For example I have the following function in mind but am not sure how to get all cities for country.
-(NSArray*) fetchCitiesFromLocationDictionary:(NSMutableDictionary *)locationDictionary usingCountry:(NSString *)country
{
}
{
509f3a914d026b589ba3a090 = {
coordinates = {
latitude = "29.76429";
longitude = "-95.3837";
};
country = USA;
id = 509f3a914d026b589ba3a090;
name = Houston;
state = Texas;
};
509f3b3a4d026b589ba3a091 = {
coordinates = {
latitude = "3.138722";
longitude = "101.686849";
};
country = Malaysia;
id = 509f3b3a4d026b589ba3a091;
name = "Kuala Lumpur";
};
509f475b4d026b589ba3a093 = {
coordinates = {
latitude = "32.803468";
longitude = "-96.769879";
};
country = USA;
id = 509f475b4d026b589ba3a093;
name = Dallas;
state = Texas;
};
}
Try something like this: