The title says it all.
total = {"Bob"=>37, "Alice"=>42, "Carl"=>42}
I want to sort it by value, and then by key, but with the key in descending order.
Like this:
{"Bob"=>37, "Carl"=>42, "Alice"=>42}
I tried:
return total.sort_by { |k, v| [v, k] }
But from here I don't know how to reverse k
...