Below, you can see the output from these two logs. The first clearly shows the full object with the property I\'m trying to access, but on the very next line of code, I can\
I faced the same problem today. In my case the keys were nested, i.e key1.key2. I split the keys using split() and then used the square bracket notation, which did work for me.
var data = {
key1: {
key2: "some value"
}
}
I split the keys and used it like this, data[key1][key2] which did the job for me.