Accessing a property of a Javascript object with bracket notation
<p>I want to access the property values of...</p>

<pre><code>var $o = {a:2, b:{c:6}};
</code></pre>

<p>...via $o[<em>index</em>] notation.</p>

<p>I'm using the newest Firebug console (I don't know whether it's using ECMAScript 5 Strict Mode), but when I use $o[0], $o[0].a or $o['0'], I get undefined and TypeError.</p>
