I am getting array of dictionary and I want to sort that data alphabetically to show indexed tableview functionality.how can i sort array with dictionary to implement indexed tableview.to sort array here is my code:
NSArray *array1 = [NSArray arrayWithArray:resultArray];
NSSortDescriptor *sortByName = [NSSortDescriptor sortDescriptorWithKey:@"first_name" ascending:YES selector:@selector(caseSensitive)] ;
NSArray *sortDescriptors = [NSArray arrayWithObject:sortByName];
sortedArray = [array1 sortedArrayUsingDescriptors:sortDescriptors];
I am trying with code but, when i am displaying data in tableview its getting mismatch.Please suggest me correct way. Thanks.