From: Marco Date: 2005-10-22T05:01:59+09:00 Subject: Re: array in hash... argh!! Edward Faulkner wrote: > Assuming this: > > movies={ > "title"=>["ciccio", "test", "ciccio panza"], > "id"=>["3", "4", "1"], > "description"=>["1", "", "hey?"], > "insert_date"=>["2005-10-19", "2005-10-20", "2005-10-18"] > } > > Then this returns an array containing three hashes, one for each > movie: > > movies.values[0].zip(*a.values[1..-1]).map{|x| Hash[*a.keys.zip(x).flatten]} hey thank you both!! Edward, i will probably never understand your one-liner :) (trying to do that now) And tmanks Jamis too!