Jhorra Jhorra - 9 months ago 50
Swift Question

Objective-C Simplest way to create comma separated string from an array of objects

So I have a nsmutablearray with a bunch of objects in it. I want to create a comma separated string of the id value of each object.


Use the NSArray instance method componentsJoinedByString:.

- (NSString *)componentsJoinedByString:(NSString *)separator.


NSString *joinedComponents = [array componentsJoinedByString:@","];