NSMutableString *groupName = [[NSMutableString alloc]init]; for (int i = 0; i< addedFriendArray.count; i++) { (i==0)?:[groupName appendString:@","]; NSString *name = [[addedFriendArray objectAtIndex:i] name]; [groupName appendString:name]; } NSLog(@"groupName is%@",groupName);