title: Get data from NSDictionary
body: <p>I have two json files which are linked by key country_id (one country - many cities), data from a json file I write in <code>NSDictionary</code> s.</p>
  
  <p>question : if i selected one of the countries from first <code>NSDictionary</code> (dictionary of countries data) how to show all the data that is bind to selected country_id in other dictionary(dictionary of cities data)?</p>
  
  <hr>
  
  <p><strong>What i tried?</strong></p>
  
  <p>I tried to do next:check all key values of second <code>NSDictionary</code>(dictionary of cities data) is they equal to selected county_id</p>
  
  <pre><code>    //dict3 - dictionary of cities data
    for (int i = 0; i&lt;=[[dict3 valueForKey:@"country_id"] count];i++)
        {
        if ([[[dict3 valueForKey:@"country_id"] objectAtIndex:i] isEqualToString:appDelegate.idSelectedCountry])
        {
          NSLog(@"object %@",[nameCities objectAtIndex:i]);   //array of cities name
        }} 
  </code></pre>
  
  <p>But because my JSON files are quite big this is takes too long to compute.</p>