title: Creating hash from an array of values in Ruby
body: <p>I want to use each item in the array as values in a hash with the same key "name".</p>
  
  <p><code>people = ["Bob", "Mary", "Sarah", "Tim", "Maggie"]</code></p>
  
  <p>I want to get:</p>
  
  <p><code>{ name: =&gt; "Bob", name: =&gt; "Mary", name: =&gt; "Sarah", name: =&gt; "Tim", name: =&gt; "Maggie"}</code></p>
  
  <p>When I do <code>Hash[people.map {|v| ["name", v]}]</code> or </p>
  
  <p><code>people.map{|v| hash['name'] = v}</code></p>
  
  <p>it zips only the last item so I get this as a result :</p>
  
  <pre><code>{"name"=&gt;"Maggie"}
  </code></pre>