From: Edward Faulkner Date: 2005-10-22T04:46:16+09:00 Subject: Re: array in hash... argh!! --ADZbWkCsHQ7r3kzd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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]} regards, Ed --ADZbWkCsHQ7r3kzd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDWUTynhUz11p9MSARAou9AJ991eSX+OXUTL39L4314+WIBxUfHwCghmgs CpETpP3lvUK08Npk+JOpuSQ= =85+1 -----END PGP SIGNATURE----- --ADZbWkCsHQ7r3kzd--