title: NSDictionary - how return the Key as a string
body: <p>I have a plist like this:</p>
  
  <pre><code>&lt;dict&gt;
  &lt;key&gt;New item&lt;/key&gt;
  &lt;dict&gt;
      &lt;key&gt;document&lt;/key&gt;
      &lt;string&gt;driving licence&lt;/string&gt;
      &lt;key&gt;Overview&lt;/key&gt;
      &lt;string&gt;a driving licence is required.......&lt;/string&gt;
  &lt;/dict&gt;
  </code></pre>
  
  <p></p>
  
  <p>if I want to get the object I would write something like this:</p>
  
  <pre><code> myString = [somedictionary objectForKey:@"Overview"];
  </code></pre>
  
  <p>what about if I want to get "overview" from my plist???
  I Hope it's clear..... Please do not give negative vote.... I'm still learning!;-)</p>
  
  <p>EDITED VERSION:</p>
  
  <p>Better to be more specific:</p>
  
  <p>i have this code</p>
  
  <pre><code> for (NSDictionary *playDictionary in playDictionariesArray) {
          Play *play = [[Play alloc] init];
          play.name = [playDictionary objectForKey:@"playName"];
  </code></pre>
  
  <p>which is the Apple sample code:
  <a href="http://developer.apple.com/library/ios/#samplecode/TableViewUpdates/Introduction/Intro.html" rel="noreferrer">http://developer.apple.com/library/ios/#samplecode/TableViewUpdates/Introduction/Intro.html</a></p>
  
  <p>In this sample the string play return the name of the play in the header section but I want
  to modify it and get the "Key" in the header (in this case would be "PlayName).</p>
  
  <p>THANKS TO EVERYBODY: THIS IS HOW I FIXED IT:</p>
  
  <pre><code> NSMutableArray *anArray = [[NSMutableArray alloc] init];
      [anArray addObject:@"Overview"];
      [anArray addObject:@"pre-requirements"];
      [anArray addObject:@"where"];
      [anArray addObject:@"what"];
  
  
      //Use a for each loop to iterate through the array
      for (NSString *s in anArray) {
  
              Play *play = [[Play alloc] init];
              play.name = s;
  </code></pre>