title: Transform array of objects in Ruby
body: <p>I have JSON with one object for each site's traffic for 3 dates.  </p>
  
  <p>I want to merge these three objects together on "Date". Example below.</p>
  
  <p>I'm using Ruby. What is the easiest way to do this? </p>
  
  <p><strong>Start JSON:</strong></p>
  
  <pre><code> [  
     {  
        "Google":[  
           {  
              "Date":"2015-01-01",
              "Value":100
           },
           {  
              "Date":"2015-02-01",
              "Value":200
           },
           {  
              "Date":"2015-03-01",
              "Value":300
           }
        ]
     },
     {  
        "Yahoo":[  
           {  
              "Date":"2015-01-01",
              "Value":1200
           },
           {  
              "Date":"2015-02-01",
              "Value":1300
           },
           {  
              "Date":"2015-03-01",
              "Value":1400
           }
        ]
     },
     {  
        "Bing":[  
           {  
              "Date":"2015-01-01",
              "Value":500
           },
           {  
              "Date":"2015-02-01",
              "Value":600
           },
           {  
              "Date":"2015-03-01",
              "Value":700
           }
        ]
     }
  ]
  </code></pre>
  
  <p><strong>End JSON:</strong></p>
  
  <pre><code>[
    {  
      "Date":"2015-01-01",
      "Google":100,
      "Yahoo":1200,
      "Bing":500
    },
    {  
      "Date":"2015-01-02",
      "Google":200,
      "Yahoo":1200,
      "Bing":600
    },
    {  
      "Date":"2015-01-03",
      "Google":300,
      "Yahoo":1400,
      "Bing":700
    }
  ]
  </code></pre>