title: How to get the index of a key in a ruby hash?
body: <p>If I have </p>
  
  <pre><code>footnotes = { "apple" =&gt; "is a fruit", "cat" =&gt; "is an animal", "car" =&gt; "a transport"}
  </code></pre>
  
  <p>How can I get the index of these?, something like:</p>
  
  <pre><code>footnotes["cat"].index
  # =&gt; 1
  </code></pre>