From: Brian Candler Date: 2007-02-02T05:58:22+09:00 Subject: Re: Hash.collect On Fri, Feb 02, 2007 at 05:49:38AM +0900, Giant Cranes wrote: > a = Array.new > a << {:name => 'tony', :age => 23} > a << {:name => 'mary', :age => 57} > a << {:name => 'dom', :age => 17} > > I am trying to create an array with one attribute from each hash: > > ['tony', 'mary', 'dom'] > > Any clues on how I should do this would be much appreciated. b = a.collect { |e| e[:name] }