title: Select key value pairs from a hash whose keys belong to an array
body: <p>I have an array of keys:</p>
  
  <pre><code>keys = ["first_name", "last_name", "foo"]
  </code></pre>
  
  <p>and a hash:</p>
  
  <pre><code>hsh = {"first_name" =&gt; "tester", "zoo" =&gt; "loo", "foo" =&gt; "bar"}
  </code></pre>
  
  <p>I want to extract the key-value pairs whose keys are present in the array, to get:</p>
  
  <pre><code>res = {"first_name" =&gt; "tester", "foo" =&gt; "bar"}
  </code></pre>
  
  <p>Is there a way to do this?</p>