Getting JavaScript object key list
<p>I have a JavaScript object like</p>

<pre><code>var obj = {
   key1: 'value1',
   key2: 'value2',
   key3: 'value3',
   key4: 'value4'
}
</code></pre>

<p>How can I get the length and list of keys in this object?</p>
