title: How can I get the key value in a JSON object?
body: <p>How do I get the key value in a JSON object and the length of the object using JavaScript?</p>
  <p>For example:</p>
  <pre><code>[
    {
      &quot;amount&quot;: &quot; 12185&quot;,
      &quot;job&quot;: &quot;GAPA&quot;,
      &quot;month&quot;: &quot;JANUARY&quot;,
      &quot;year&quot;: &quot;2010&quot;
    },
    {
      &quot;amount&quot;: &quot;147421&quot;,
      &quot;job&quot;: &quot;GAPA&quot;,
      &quot;month&quot;: &quot;MAY&quot;,
      &quot;year&quot;: &quot;2010&quot;
    },
    {
      &quot;amount&quot;: &quot;2347&quot;,
      &quot;job&quot;: &quot;GAPA&quot;,
      &quot;month&quot;: &quot;AUGUST&quot;,
      &quot;year&quot;: &quot;2010&quot;
    }
  ]
  </code></pre>
  <p>Here, length of this array is 3. For getting, value is fine <code>([0].amount)</code>, in index<code>[0]</code> it has three name value pairs.</p>
  <p>So, I need to get the name (like amount or job... totally four name) and also how do I count how many names there are?</p>