title: Passing NSArray to Detail View using Plist?
body: <p>I'm currently using the following plist to create a drill down table view. However, I'm having problems passing the array of children over to the DetailViewController.</p>
  
  <pre><code>&lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;Food&lt;/key&gt;
      &lt;array&gt;
          &lt;dict&gt;
              &lt;key&gt;Name&lt;/key&gt;
              &lt;string&gt;Food&lt;/string&gt;
              &lt;key&gt;Description&lt;/key&gt;
              &lt;string&gt;Description about Food.&lt;/string&gt;
              &lt;key&gt;IconLink&lt;/key&gt;
              &lt;string&gt;WFImage.png&lt;/string&gt;
              &lt;key&gt;Children&lt;/key&gt;
              &lt;array&gt;
                  &lt;dict&gt;
                      &lt;key&gt;ChildName&lt;/key&gt;
                      &lt;string&gt;Burgers&lt;/string&gt;
                      &lt;key&gt;ChildDescription&lt;/key&gt;
                      &lt;string&gt;Description of Burgers&lt;/string&gt;
                      &lt;key&gt;ChildIconLink&lt;/key&gt;
                      &lt;string&gt;WFImage.png&lt;/string&gt;
                      &lt;key&gt;ChildImageLink&lt;/key&gt;
                      &lt;string&gt;WFBanner.png&lt;/string&gt;
                  &lt;/dict&gt;
                  &lt;dict&gt;
                      &lt;key&gt;ChildName&lt;/key&gt;
                      &lt;string&gt;Hot Dogs&lt;/string&gt;
                      &lt;key&gt;ChildDescription&lt;/key&gt;
                      &lt;string&gt;Description of Hot Dogs&lt;/string&gt;
                      &lt;key&gt;ChildIconLink&lt;/key&gt;
                      &lt;string&gt;WFImage.png&lt;/string&gt;
                      &lt;key&gt;ChildImageLink&lt;/key&gt;
                      &lt;string&gt;WFBanner.png&lt;/string&gt;
                  &lt;/dict&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
  </code></pre>
  
  <p>Using the following I was able to pass down the array of children to my detail view (correct amount of rows will show), but I'm not able to extract any children elements.</p>
  
  <pre><code>- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  
          if ([segue.identifier isEqualToString:@"showMenuDetail"]) {
  
              NSIndexPath *indexPath = [self.menuTableView indexPathForSelectedRow];
              HomeDetailViewController *HDViewController = segue.destinationViewController;
              HDViewController.foodChildren = [[menu objectAtIndex:indexPath.row] objectForKey:@"Children"];
              HDViewController.foodName = [[menu objectAtIndex:indexPath.row] objectForKey:@"Name"];
  
              NSLog(@"Food Children: %@", HDViewController.foodChildren);
      }
  
  }
  </code></pre>
  
  <p>When I try the following in the detail view's cellForRowAtIndexPath:</p>
  
  <pre><code>children = [foodChildren objectForKey:@"ChildName"];
  cell.textLabel.text = [children objectAtIndex:indexPath.row];
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>reason: '-[__NSCFArray objectForKey:]: unrecognized selector sent to
    instance 0x200a7870'</p>
  </blockquote>
  
  <p>Any help would be appreciated!!!</p>