Search code examples
objective-carraysnsstringnsarray

Convert NSArray to NSString in Objective-C


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


Solution

  • NSString * result = [[array valueForKey:@"description"] componentsJoinedByString:@""];