Reputation: 733
I'm attempting to reference an object property that has a .
in the name. So, for example, in fdb
if I have an object:
MyObject target.property
If I attempt to "print":
fdb> print MyObject.target.property
I get:
Variable target.property unknown
How do I access this property and look at it's contents given that it's name is target.property
Upvotes: 0
Views: 320
Reputation: 82028
It is generally a bad idea to have .
as part of a property name, but it can be gotten by:
var val = MyObject[ "target.property" ]
That is called "array notation". It is slower and buggier than the correct way to address a property. It also allows for the introduction of a number of potential bugs and difficulties in diagnosis but, in cases where you don't have control of the input, it will be sufficient.
Upvotes: 3