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 th
Another way:
total.sort_by { |k,v| [-v,k] }.reverse.to_h #=> {"Bob"=>37, "Carl"=>42, "Alice"=>42}