G
Giant Cranes
Hi,
I am pulling my hair out trying to figure out the following problem (my
fault not rubys):
I have an array of hashes as follows:
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.
Thanks,
GiantCranes
I am pulling my hair out trying to figure out the following problem (my
fault not rubys):
I have an array of hashes as follows:
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.
Thanks,
GiantCranes