From: 7stud -- Date: 2012-12-11T07:58:51+09:00 Subject: Re: Dynamically create an array grades = [ { "subject" => "english", "Jim" => 94, "Billy" => 58 }, { "subject" => "math", "Jim" => 90, "Billy" => 80 }, { "subject" => "science", "Jim" => 99, "Billy" => 58 }, ] jim = [] billy = [] grades.each do |hash| jim << hash['Jim'] billy << hash['Billy'] end p jim p billy --output:-- [94, 90, 99] [58, 80, 58] -- Posted via http://www.ruby-forum.com/.