Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my_array_of_hashes = [ {:customer=>"Matthew", :fruit=>"Apples", :quantity=>2, :order_month => "January"}, {:customer => "Philip", :fruit => "Oranges", :quantity => 3, :order_month => "July"}, {:customer => "Matthew", :fruit => "Oranges", :quantity => 1, :order_month => "March"}, {:customer => "Charles", :fruit => "Pears", :quantity => 3, :order_month => "January"}, {:customer => "Philip", :fruit => "Apples", :quantity => 2, :order_month => "April"}, {:customer => "Philip", :fruit => "Oranges", :quantity => 1, :order_month => "July"} ]
- -----------------------------------
- Customer | Apples | Oranges | Pears
- Charles | | | 3
- Matthew | 2 | 1 |
- Philip | 2 | 4 |
- -----------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement