Merge hash and join value as array
I am looking to convert the following data structure 

    series = [{:name => "foo", :data => [12, 23]}, 
              {:name => "bar", :data => [14, 22]}, 
              {:name => "foo", :data => [15, 26]}]

to
         
    series = [{:name => "foo", :data => [[12, 23],[15,26]]},
     {:name => "bar", :data => [14, 22]}]

What should be the best way to solve this in ruby 1.8?
Merge hash and join value as array
===

I am looking to convert the following data structure 

    series = [{:name => "foo", :data => [12, 23]}, 
              {:name => "bar", :data => [14, 22]}, 
              {:name => "foo", :data => [15, 26]}]

to
         
    series = [{:name => "foo", :data => [[12, 23],[15,26]]},
     {:name => "bar", :data => [14, 22]}]

What should be the best way to solve this in ruby 1.8?