title: Exception parsing NSDictionary within NSDictionary
body: <p>I have following plist:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;1_NARR&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;audio&lt;/key&gt;
          &lt;string&gt;1 NARR AUDIO LOCATION&lt;/string&gt;
          &lt;key&gt;text&lt;/key&gt;
          &lt;string&gt;1 NARR TEXT&lt;/string&gt;
      &lt;/dict&gt;
      &lt;key&gt;1_C1_1&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;text&lt;/key&gt;
          &lt;string&gt;1 C1 1 TEXT&lt;/string&gt;
          &lt;key&gt;audio&lt;/key&gt;
          &lt;string&gt;1 C1 1 AUDIO LOCATION&lt;/string&gt;
          &lt;key&gt;position&lt;/key&gt;
          &lt;string&gt;1 C1 1 Position&lt;/string&gt;
          &lt;key&gt;frameX&lt;/key&gt;
          &lt;string&gt;1 C1 1 FRAMEX&lt;/string&gt;
      &lt;/dict&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>Here is my code to iterate through the list:</p>
  
  <pre><code>NSDictionary *mainDictionary = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"dialogues" ofType:@"plist"]];
  
      if (mainDictionary != nil){
          NSLog(@"viewDidLoad: mainDictionary != nil");
          [self parseDictionary:mainDictionary];
      }
  
  - (void)parseDictionary:(NSDictionary*)aDictionary
  {
      // enumerate key/values, recursing as necessary
      [aDictionary enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL *stop) {
          if ([value isKindOfClass: [NSDictionary class]]) {
              NSLog(@"parseDictionary: isKindOfClass: NSDictionary");
              [self parseDictionary: value];
          } else {
              //... parse value here ...
              NSLog(@"parseDictionary: else: ");
              if ([value valueForKey:@"text"]) 
              {            
                  NSLog(@"parseDictionary: else: if: ");
                  //NSLog(@"parseDictionary: if: valueForKey:text == %@", [value valueForKey:@"text"]);
              }
          }
      }];
  }
  </code></pre>
  
  <p>I am getting following exception:</p>
  
  <pre><code>Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[&lt;__NSCFString 0x6899760&gt; valueForUndefinedKey:]: this class is not key value coding-compliant for the key text.'
  </code></pre>
  
  <p>I am unable to figure out why? Do you see any issues with the logic? Would appreciate your responses.</p>
  
  <p>Here is complete stack trace:</p>
  
  <pre><code>Terminating app due to uncaught exception 'NSUnknownKeyException',
  reason: '[&lt;__NSCFString 0x6e7a780&gt; valueForUndefinedKey:]: this class
  is not key value coding-compliant for the key text.'
  *** First throw call stack: (0x16c0022 0x14e0cd6 0x16bfee1 0x1e7efe 0x156831 0x155c99 0x28bf 0x16bf8f8 0x15e39ed 0x165bbd6 0x165b84d
  0x165b795 0x27cb 0x287e 0x16bf8f8 0x15e39ed 0x165bbd6 0x165b84d
  0x165b795 0x27cb 0x2a41 0x55fa1e 0x23f1 0x4964be 0x497274 0x4a6183
  0x4a6c38 0x49a634 0x1be3ef5 0x1694195 0x15f8ff2 0x15f78da 0x15f6d84
  0x15f6c9b 0x496c65 0x498626 0x201d 0x1f95) terminate called throwing
  an exception
  </code></pre>