title: How do I traverse a multi dimensional NSArray?
body: <p>I have array made from JSON response. </p>
  
  <p><code>NSLog(@"%@", arrayFromString)</code> gives the following: </p>
  
  <blockquote>
    <p>{
            meta =     {
                code = 200;
            };
            response =     {
                groups =         (
                                {
                        items =                 (
                                                {
                                categories =                         (
                                                                {
                                        icon =
    "http://foursquare.com/img/categories/parks_outdoors/default.png";
                                        id = 4bf58dd8d48988d163941735;</p>
  </blockquote>
  
  <p>and so on...</p>
  
  <p>This code</p>
  
  <p><code>NSArray *arr = [NSArray arrayWithObject:[arrayFromString valueForKeyPath:@"response.groups.items"]];</code></p>
  
  <p>gives array with just one element that I cannot iterate through. But if I write it out using NSLog I can see all elements of it. </p>
  
  <p>At the end I would like to have an array of items that I can iterate through to build a datasource for table view for my iPhone app. </p>
  
  <p>How would I accomplish this?</p>
  
  <p>EDIT:</p>
  
  <p>I have resolved my issue by getting values from the nested array (objectAtIndex:0):</p>
  
  <pre><code>for(NSDictionary *ar in [[arrayFromString valueForKeyPath:@"response.groups.items"] objectAtIndex:0]) {
          NSLog(@"Array: %@", [ar objectForKey:@"name"]);
      }
  </code></pre>