This will be tuff because I don’t really know how to ask the right question. So, I have an object with the following structure:

When I do:
console.info(myObject.StackPaneProvider)
I get the expected result:

But if I try to access it dynamically with
var key = "StackPaneProvider";
console.info(myObj.key);
(actually the key variable is generated dynamically, and it is of type string) I get “undefined” in Firebug. Why?
You want to use
[key]for example