JavaScript - cannot set property of undefined
<p>My code:</p>

<pre><code>    var a = "1",
        b = "hello",
        c = { "100" : "some important data" },
        d = {};

        d[a]["greeting"] = b;
        d[a]["data"] = c;

        console.debug (d);
</code></pre>

<p>I get the following error: Uncaught TypeError: Cannot set property 'greeting' of undefined.</p>

<p>I'm trying to do something similar to an associative array. Why isn't this working?</p>
