title: How to remove parentheses from array element
body: <p>I have an iOS app that uses Core Data to persist information retrieved from a server.  I use a basic fetch request to grab all the <code>managedObjects</code> for a given <code>entity</code>.  The <code>managedObjects</code> are put into an array which I use to populate a <code>tableViewController</code>.  Each cell in the table has a <code>UITextField</code> that I am trying to put the information into.  I can get the data into the text field but each element comes with parentheses around them.  <strong>How can I get rid of these and just show the text?</strong></p>
  
  <p>Here is the fetch request:</p>
  
  <pre><code>NSManagedObjectContext *moc = self.managedObjectContext;
  NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"UserInfo" inManagedObjectContext:moc];
  NSFetchRequest *request = [[NSFetchRequest alloc] init];
  [request setEntity:entityDescription];    
  NSArray *objects = [moc executeFetchRequest:request error:&amp;error];
  </code></pre>
  
  <p>Here is what I am using to populate the text fields:</p>
  
  <pre><code>self.middleNameField.text = [[objects valueForKey:@"firstName"] description];
  self.middleNameField.text = [[objects valueForKey:@"middleName"] description];
  self.lastNameField.text = [[objects valueForKey:@"lastName"] description];
  </code></pre>
  
  <p>Here is what the response looks like</p>
  
  <p><img src="https://i.stack.imgur.com/5Tekc.png" alt="enter image description here"></p>
  
  <p>This question has been asked a few times but all seem to be looking to display all contents of the array at once rather than a particular element.  Some recommend the method below.</p>
  
  <pre><code>self.firstNameField.text = [[[objects valueForKey:@"firstName"] stringByReplacingOccurrencesOfString:@"(" withString:@""]description];
  </code></pre>
  
  <p>But I get this exception error.</p>
  
  <pre><code>-[__NSArrayI stringByReplacingOccurrencesOfString:withString:]: unrecognized selector sent to instance
  </code></pre>
  
  <p>Could someone point me in the right direction on this?  I realize I may be going about this all the wrong way.  Don't hesitate to recommend a better method to accomplish the same task.   <strong>Snippets Really Help!</strong></p>