From: Gilbert Lau Date: 2007-06-18T11:08:18+09:00 Subject: Re: Adding new value (in array) to existing key in a hash Thanks a lot. Sorry, got another question let's say that the hash is myhash = {"a" => [[0,0],[3,4]], "b" => [[1,1],[9,8]], "c" => [[7,6]]} how do I sort the values to become [0,0],[1,1],[3,4],[7,6],[9,8] and be able to recall the keys to arrange according to the sorted values, like "a", "b", "a", "c", "b" -- Posted via http://www.ruby-forum.com/.