title: Objective C Get Dictionary from Array[i]
body: <p>I have an array of dictionaries that populate a tableView as seen below</p>
  
  <pre><code>self.tableCell.usernameLabel.text = [self.loadTableArrayCopy[indexPath.row] valueForKeyPath:@"user.full_name"];
  </code></pre>
  
  <p>If the user likes the content of the row, they can press a save button on the cell and certain values from the dictionary are saved in Core Data.</p>
  
  <p>The problem: not all values from the dictionary correspond to outlets in the uitableviewcell. If that were not the case, I could do something like this</p>
  
  <pre><code>savedItem.username = self.tableCell.usernameLabel.text
  </code></pre>
  
  <p>But since some values, such as thumbnails, are not displayed in the cell, I am not sure that I could do something like this since it's not associated with a cell</p>
  
  <pre><code>savedItem.thumbnail = self.thumbnail
  </code></pre>
  
  <p>My preferred option is to take the indexPath.row, access the dictionary at array[indexPath.row] and save by setting the managed object's properties from the dictionary. How can I get this dictionary out of the array and into a local variable so I can do something like this?</p>
  
  <pre><code>savedItem.thumbnail = [myLocalDictionary valueForKeyPath@"thumbnail"];
  </code></pre>