let’s say I have a JavaScript object of this form:
var myJsObject =
{
A.b: 1
A.c: 2
}
How do I get the value of let’s say A.c?
I tried:
var value = myJsObject['A.c']
But that gave me the error Uncaught TypeError: Cannot set property 'A.c' of undefined
Thank you
You don’t need the “Object” keyword and should quote the properties. This worked in my console: