Convert NSArray to NSString in Objective-C

alexyorke picture alexyorke · Dec 1, 2009 · Viewed 187k times · Source

I am wondering how to convert an NSArray [@"Apple", @"Pear ", 323, @"Orange"] to a string in Objective-C.

Answer

Dave DeLong picture Dave DeLong · Dec 1, 2009
NSString * result = [[array valueForKey:@"description"] componentsJoinedByString:@""];