I am fetching data from core data and trying to print the name of the object at valueForKey. This has never caused me any trouble however when getting a direct object but the object I am getting is from an NSSet relationship.
When I print out the value I want, it displays in this format.
{(
Bob Marley
)}
{(
Jack Daniels
)}
etc...
I have used NSString stringWithFormat, I have tried componentsSeperatedByString, however neither of these work. If another question has been asked, I cannot find it on here. The issue is identical in a UILabel as well. Makes no difference where I print it.
Hopefully it's a simple issue.
My code for getting the value is.
//Company * company
//Employee is related in a many-many relationship
NSString * name = (NSString *)[self.company.contractor valueForKey:@"contractorName"];
NSLog(@"Name: %@", name);
Thanks.
valueForKey?