title: Ruby: replace the values in a key-value pair of an array of hashes with the values from a 2nd array
body: <p>In Ruby, I have an array of hashes and an array.  In my array of hashes, I want to replace the values in one of the key-value pairs with the values from my second array.  What is the cleanest way to accomplish this?</p>
  
  <p>Example (I want to replace the value of "total" with the values from my second array):</p>
  
  <p><strong>Array of hashes:</strong></p>
  
  <pre><code> [{"date":"2012-05-27","total":1},{"date":"2012-05-28","total":9}]
  </code></pre>
  
  <p><strong>Array:</strong></p>
  
  <pre><code> [1, 10]
  </code></pre>
  
  <p><strong>Desired Array of hashes:</strong></p>
  
  <pre><code> [{"date":"2012-05-27","total":1},{"date":"2012-05-28","total":10}]
  </code></pre>