How can i sort array using Firt_name Key.
I used this Code but its not helpful.
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"user.first_name"ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)];
NSArray *sortDescriptors = [NSArray arrayWithObjects:sortDescriptor, nil];
NSArray *sortedArray = [array sortedArrayUsingDescriptors:sortDescriptors];
{
"created_at" = "";
"updated_at" = "";
user = {
"first_name" = Gary;
"full_contact" = "null 5555555555";
"full_name" = "Gary123";
};
},
by using NSSortDescriptor you can do that.
Hope it will be helpful.