I have a NSArray
of NSDictionary
. I have two specific keys which I want to use to sort my array. Basically, I currently have two NSSortDescriptor
s:
descriptor = [NSSortDescriptor sortDescriptorWithKey:@"averageNote" ascending:NO];
descriptor2 = [NSSortDescriptor sortDescriptorWithKey:@"reviews.@count" ascending:NO];
They simply sort my array based on the average note of its elements, and then in the second place based on the number of reviews.
I would like to combine these two elements to make a more realistic ranking: for instance, 70% average note and 30% review count.
How can I achieve this?