title: Find Dictionary Key inside and Array of Dictionaries
body: <p>I have an array that holds several <code>NSMutableDictionary</code> objects.</p>
  
  <p>Each time text fields are filled out and the submit button is pressed:</p>
  
  <pre><code>//The strings
  NSString *dateString = @"Date";
  NSString *timeString = @"Time";
  NSString *typeString = @"Type";
  
  - (IBAction)addData:(id)sender {
  
  [_myDictionary setObject:_dateLabel.text forKey:dateString];
  [_myDictionary setObject:_nNumber.text forKey:timeString];
  [_myDictionary setObject:_type.text forKey:typeString];
  
  [_myArray addObject:_myDictionary];
  
  [self display]
  }
  </code></pre>
  
  <p>Then I am trying to display the results in a UItextView (in this example the date) but I don't know how.</p>
  
  <pre><code>    -(void)displayData{
  
      for (int i = 0; i&lt;_myArray.count; i++) {
          [_myArray objectAtIndex:i];
          outputString = [outputString stringByAppendingFormat:@"%@\n",[_myDictionary objectForKey:@"Date"]];
  
      }
      _myTextView.text = [NSString stringWithFormat:@"%@",outputString];
  
  }
  </code></pre>
  
  <p>This ends up displaying the date for the last Dictionary in the array.  I can't even figure out how to log the date from a specific dictionary.<br>
  Say <code>[_myArray objectAtIndex:3] [_myDictionary objectForKey:@"Date"]</code>.  How would I log the date from the 3rd index?</p>
  
  <p>Hope this makes sense</p>
  
  <pre><code>EDIT SOLUTION
  
  for (int i = 0; i&lt;_myArray.count; i++)
      {
  
          outputString = [outputString stringByAppendingFormat:@"%@ %@\n",[[_myArray objectAtIndex:i]objectForKey:@"Date"], [[_myArray objectAtIndex:i]objectForKey:@"Time"]];
  
      }
      _myTextView.text = [NSString stringWithFormat:@"%@",outputString];
  
  }
  </code></pre>
  
  <p>Thanks for all the quick help!!</p>