From: "Mark J.Reed" Date: 2005-10-22T06:12:00+09:00 Subject: Re: array in hash... argh!! Simon Strandgaard writes: >even shorter.. I am having dinner in front of my mac.. >res =3D h.values.transpose.map{|a|Hash[*h.keys.zip(a)]} That doesn't quite work. You need to flatten the result of each zip, as posted earlier: movies.values.transpose.map{|a|Hash[*movies.keys.zip(a).flatten]} Your version yields this on the given input, which is not quite right: [{["title", "ciccio"]=>["id", "3"], ["description", "1"]=>["insert_date", "2005-10-19"]}, {["description", ""]=>["insert_date", "2005-10-20"], ["title", "test"]=>["id", "4"]}, {["title", "ciccio panza"]=>["id", "1"], ["description", "hey?"]=>["insert_date", "2005-10-18"]}] In fact, it would raise an exception if there didn't happen to be an even number of fields per record.