NSMutableArray *categoryArray = [[NSMutableArray alloc] init];
NSMutableArray *belongArray = [[NSMutableArray alloc] init];
for (int i = 0; i<_dataArray.count; i++){
NSString *string = _dataArray[i][@"belong"];
if (![categoryArray containsObject:string]){
[categoryArray addObject:string];
[belongArray addObject:[_dataArray objectAtIndex:i]];
}
}
网友评论