For sorting the array of dictionaries based on a particular key which is neither in ascending nor in descending order, but in a random user defined order, I have written the following code using NSPredicate and I got the expected result.
NSMutableArray *filterArray = [[NSMutableArray alloc] init];
NSArray *sortArray = [[NSArray alloc] initWithObjects:@"US",@"UK",@"THAILAND",@"BRAZIL",@"JAPAN",@"AUSTRALIA",nil]; // Array containing all the distinct value for the key 'Currency' in self defined order (neither descending nor ascending order).
NSPredicate *predCurrency = nil;
// Creating the predicate for individual objects in the sortArray and appending it to the filterArray.
for (int i = 0; i < [sortArray count]; i++) {
predCurrency = [NSPredicate predicateWithFormat:@"(NEW_KEY_22 contains[cd] %@)",[sortArray objectAtIndex:i]];
[filterArray addObjectsFromArray:[myNewArray filteredArrayUsingPredicate:predCurrency]];
}
NSLog(@"%@",filterArray);
// Finally setting the filterArray to the array controller.
[commercialArrayController addObjects:filterArray]; // This gives the resultant array having the defined order in sortArray.