From: Craig Law Date: 2012-06-18T14:59:39+09:00 Subject: Re: Overwriting one Ruby array of arrays with another Thanks Jan Will start new post next time. I had to modify your code a bit to get what I wanted ... sorted_keys = hash1.keys.sort do |(x1, y1), (x2, y2)| y_comparison = y2 <=> y1 if y_comparison != 0 y_comparison else x1 <=> x2 end end pp sorted_keys ... and it produces an array in the order that I want it but it only contains the keys (i.e. [1,1]). How do I include the ["X","20120617"] so that I get [1, 1, "X", "20120617"] in the array? I just can't figure out how to tack on the values associated with the keys. Thanks Craig -- Posted via http://www.ruby-forum.com/.