title: Objective-C: How to get data from selected row in table?
body: <p>I need to retrieve a string from <strong>data from a selected row in a table</strong> to compare it to a string.</p>
  
  <p>I call</p>
  
  <pre><code>NSArray *values = [self.tableArrayController selectedObjects];
  </code></pre>
  
  <p>To get the objects at the selected row. However, values only has a count of objects of 1, and everything seems to be one big, long string of all my values. I cannot search through the values because I won't always know what to search for. I need a specific value (of which they are organized by columns).</p>
  
  <p>I was hoping that the array would be of a certain count and I could retrieve the string based on the index of the object for the string.</p>
  
  <p>How should I get all the different values (organized by columns) for a selected row?</p>
  
  <p>EDIT:</p>
  
  <p>I populate a NSDictionary (withmore values than that, this is just an example). The string value is the column identifier. The object is the object I'm adding that I want to appear on the table. This part below already works as I want it to:</p>
  
  <pre><code>NSDictionary *dict =[NSDictionary dictionaryWithObjectsAndKeys:
                           object1, @"column",                      
                           object2, @"column2",
                           nil];
  [self.tableArrayController addObject:dict];
  </code></pre>