I\'ve seen a lot of examples of sorting a dictionary by keys, then getting the values, but how would I sort instead by values.
e.g.
{ blue:12; red:50
Or you could just sort your NSString keys directly like:
NSArray* sortedKeys = [sortedKeys sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { NSNumber *A = @([obj1 LongValue]); NSNumber *B = @([obj2 LongValue]); return [A compare:B]; } ];