title: How to get key from json file format..?
body: <p>I'm using json gem in ruby..,My ruby code is here..,</p>
  
  <pre><code>require 'json'
  
  json = JSON.generate [1, 2, [{"pi" =&gt; 3.141}, {"integer" =&gt; 1234567890}], {"subject" =&gt; "Mathematics"}, {"Float"=&gt; 1.324343}, {"number"=&gt; 232132435}]
  generator = JSON.parse json
  puts generator[2][1]
  </code></pre>
  
  <p>My key-value pair is working fine.But, I'm trying to print only the key not an value from index[2] such as either an "integer" or "pi".
  Is it possible..? </p>