Mi código:
var a = "1",
b = "hello",
c = { "100" : "some important data" },
d = {};
d[a]["greeting"] = b;
d[a]["data"] = c;
console.debug (d);
Obtuve el siguiente error:
Uncaught TypeError: no se puede establecer la propiedad 'greeting' de undefined.
Estoy tratando de hacer algo similar a una matriz asociativa. ¿Por qué esto no funciona?