title: ruby select element nested hash same keys
body: <p>I have the hash below from which I'm trying to get "value" of the element matching '"year" => "2014"' and '"period" => "M06"'.</p>
  
  <pre><code>result = {"status"=&gt;"REQUEST_SUCCEEDED", "responseTime"=&gt;28, "message"=&gt;[], "Results"=&gt;{"series"=&gt;[{"seriesID"=&gt;"LNU03034342", "data"=&gt;[{"year"=&gt;"2014", "period"=&gt;"M06", "periodName"=&gt;"June", "value"=&gt;"11.1", "footnotes"=&gt;[{}]}, {"year"=&gt;"2014", "period"=&gt;"M05", "periodName"=&gt;"May", "value"=&gt;"16.8", "footnotes"=&gt;[{}]}, {"year"=&gt;"2014", "period"=&gt;"M04", "periodName"=&gt;"April", "value"=&gt;"18.8", "footnotes"=&gt;[{}]}, {"year"=&gt;"2014", "period"=&gt;"M03", "periodName"=&gt;"March", "value"=&gt;"18.7", "footnotes"=&gt;[{}]}, {"year"=&gt;"2014", "period"=&gt;"M02", "periodName"=&gt;"February", "value"=&gt;"17.6", "footnotes"=&gt;[{}]}, {"year"=&gt;"2014", "period"=&gt;"M01", "periodName"=&gt;"January", "value"=&gt;"16.0", "footnotes"=&gt;[{}]}]}]}}
  </code></pre>
  
  <p>So far I have 'result["Results"]["series"][0]["data"]' which yields:</p>
  
  <pre><code>{"year"=&gt;"2014", "period"=&gt;"M06", "periodName"=&gt;"June", "value"=&gt;"11.1", "footnotes"=&gt;[{}]}
  {"year"=&gt;"2014", "period"=&gt;"M05", "periodName"=&gt;"May", "value"=&gt;"16.8", "footnotes"=&gt;[{}]}
  {"year"=&gt;"2014", "period"=&gt;"M04", "periodName"=&gt;"April", "value"=&gt;"18.8", "footnotes"=&gt;[{}]}
  {"year"=&gt;"2014", "period"=&gt;"M03", "periodName"=&gt;"March", "value"=&gt;"18.7", "footnotes"=&gt;[{}]}
  {"year"=&gt;"2014", "period"=&gt;"M02", "periodName"=&gt;"February", "value"=&gt;"17.6", "footnotes"=&gt;[{}]}
  {"year"=&gt;"2014", "period"=&gt;"M01", "periodName"=&gt;"January", "value"=&gt;"16.0", "footnotes"=&gt;[{}]}
  </code></pre>
  
  <p>Now, all the keys in each element of this parent hash are the same, so I'll need to get what I want by searching period for M06, select that element, then get value from the element.  How do I do this?  </p>
  
  <p>I realize that technically I could take the first of the nested hashes since I'm seeking the highest period, but that seems sloppy.</p>