In a NSMutableDictionary like this:
[NSMutableDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithString:firstName], @"NAME",
[NSNumber numberWithFloat:familyName], @"SURNAME",
nil];
How can all of its elements be converted to the NSString? with the requirement that names and surnames are arranged in string like this: “name, surname, name, surname…”?
This gives a string with all the names but not surnames:
NSString * result = [[urlArray valueForKey:@"NAME"] componentsJoinedByString:@", "];
Is there a way similar to the one above to create a string with all the values of NSMutableDictionary?
Try something like this:
The
%@represents an objective-c object for more details see the Apple docs