数组里面字典按字段升序或者降序

NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"country" ascending:YES]; 
 [userArray sortUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]]; 

原文地址:https://www.cnblogs.com/Milo-CTO/p/4717456.html