From: Brian Candler Date: 2010-04-03T17:02:53+09:00 Subject: Re: hash key with multiple values BTW, the structure you have with an array of hashes, each hash with a single k/v pair, is unusual: @results = [{"x"=>"i8"}, {"y"=>"i58"}, {"y"=>"i6"}, {"y"=>"v5"}, {"z"=>"ci5"}, {"z"=>"i63"}, {"w"=>"cie201"}] It would be more usual to have 2-element arrays for the k/v pairs: @results = [["x","i8"], ["y","i58"], ["y","i6"], ["y","v5"], ["z","ci5"], ["z","i63"], ["w","cie201"]] which in turn simplifies the processing: @conver_results = Hash.new { |h,k| h[k] = [] } @results.each { |k,v| @conver_results[k] << v } -- Posted via http://www.ruby-forum.com/.