Javascript (JSON) Objects: Get Parent
- by Dänu
Hey Guys
I got some question about nested javascript objects (is it me, google or is javascript quite poorly documented?). Now, I got the following (nested) object:
obj: { subObj: { 'hello world' } };
next thing I do is to reference the subobject like this:
var s = obj.subObj;
now what I would like to do, is to get a reference to the object obj out of the variable s.
Something like:
var o = s.parent;
Is this somehow possible?