title: extract data from Plist to array and dictionary
body: <p>I made a plist that looks like that:</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;array&gt;
  &lt;array&gt;
      &lt;dict&gt;
          &lt;key&gt;Company&lt;/key&gt;
          &lt;string&gt;xxx&lt;/string&gt;
          &lt;key&gt;Title&lt;/key&gt;
          &lt;string&gt;VP Marketing&lt;/string&gt;
          &lt;key&gt;Name&lt;/key&gt;
          &lt;string&gt;Alon ddfr&lt;/string&gt;
      &lt;/dict&gt;
      &lt;dict&gt;
          &lt;key&gt;Name&lt;/key&gt;
          &lt;string&gt;Adam Ben Shushan&lt;/string&gt;
          &lt;key&gt;Title&lt;/key&gt;
          &lt;string&gt;CEO&lt;/string&gt;
          &lt;key&gt;Company&lt;/key&gt;
          &lt;string&gt;Shushan ltd.&lt;/string&gt;
      &lt;/dict&gt;
  &lt;/array&gt;
  &lt;array&gt;
      &lt;dict&gt;
          &lt;key&gt;Company&lt;/key&gt;
          &lt;string&gt;xxx&lt;/string&gt;
          &lt;key&gt;Title&lt;/key&gt;
          &lt;string&gt;CTO&lt;/string&gt;
          &lt;key&gt;Name&lt;/key&gt;
          &lt;string&gt;Boaz frf&lt;/string&gt;
      &lt;/dict&gt;
  &lt;/array&gt;
  &lt;/array&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>Now I want to extract the data like that (all the 'A' for key "Name" to one section and all the 'B' "Name" to other one): </p>
  
  <pre><code>NSString *plistpath = [[NSBundle mainBundle] pathForResource:@"PeopleData" ofType:@"plist"];
  NSMutableArray *attendees = [[NSMutableArray alloc] initWithContentsOfFile:plistpath];
  
  
  listOfPeople = [[NSMutableArray alloc] init];//Add items
  
  NSDictionary *indexADict = [NSDictionary dictionaryWithObject:[[attendees objectAtIndex:0] objectForKey:@"Name"] forKey:@"Profiles"];
  
  
  NSDictionary *indexBDict = [NSDictionary dictionaryWithObject:[[attendees objectAtIndex:1] objectForKey:@"Name"]  forKey:@"Profiles"];
  
  [listOfPeople addObject:indexADict];
  [listOfPeople addObject:indexBDict];
  </code></pre>
  
  <p>This in order to view them in sectioned tableView.</p>
  
  <p>I know that the problem is here:  </p>
  
  <pre><code>NSDictionary *indexADict = [NSDictionary dictionaryWithObject:[[attendees objectAtIndex:0] objectForKey:@"Name"] forKey:@"Profiles"];
  </code></pre>
  
  <p>But I just can't figure how to do it right.  </p>
  
  <p>Thanks.</p>