title: App crashes when using allKeys, is it because there is only one object?
body: <p>I can't figure out why xcode continues to throw this error</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-    
  [__NSCFString allKeys]: unrecognized selector sent to instance 0x9367330'
  </code></pre>
  
  <p>whenever I use this code</p>
  
  <pre><code>NSDictionary *nextArray = [_classDictionary 
  valueForKeyPath:@"response.page_records.page_record"];
  for (NSDictionary *roster2 in nextArray) {
  NSArray *keys = [roster2 allKeys];
  if ([keys containsObject:@"title"]){
      [pageName addObject:[roster2 objectForKey:@"title"]];
  }
  if ([keys containsObject:@"id"]) {
  [pageID addObject:[roster2 objectForKey:@"id"]];
  }
  }
  </code></pre>
  
  <p>After trying to debug it I found out that the exception is only thrown when there is only one object for the key.  For example when "nextArray" is this:</p>
  
  <pre><code> (
   {
      "class_id" = 0001;
      "id" = 1234;
      "title" = "First Page";
  },
  {
       "class_id" = 0002;
       "id" = 12345;
       "title" = Assignments;
   }
   )
  </code></pre>
  
  <p>the code runs without an exception, but when the code is simply</p>
  
  <pre><code>      {
           "class_id" = 0001;
           "id" = 1234;
           "title" = "First Page";
       }
  </code></pre>
  
  <p>The exception is thrown.  Why would this be happening?  The keys still contains the object title, even if there is only one object.  Any other ideas why this exception is being thrown?  Does it have something to do with the parenthesis? (total guess)  Is there a better way to debug what is really going on?</p>
  
  <p>EDIT:  Here is the _userDictionary.  What is the best way to have an ordered array of the objectforKey: @"title" and avoid the above error?</p>
  
  <pre><code>response =     {
      "status" = ok;
      "page_records" =         {
          "page" = 1;
          "page_count" = 1;
          "records_per_page" = 50;
          "total_record_count" = 2;
          "page_record" =             (
                              {
                  "class_id" = 0001;
                  "id" = 1234;
                  "title" = "Test page";
              },
                              {
                  "class_id" = 0002;
                  "id" = 12345;
                  "title" = "testing page 2";
              }
          );
      };
  };
  }
  </code></pre>