im not very experienced in ruby, so im struggling to format a piece of data.
I have this hash, wich contains some keys that have the same value, ex:
{"key" => "value1", "key2" => "value2", "key3" => "value3", "key4" => "value1", "key5" => "value2" ..}
I'm trying to turn this into, an array containing the keys grouped by the values
[["key","key4"],["key2","key5"],["key3"]]
Any help would be appreciated.