Subj : Re: obtaining a parent value in javascript object notation To : Mark Turansky From : Brendan Eich Date : Fri May 20 2005 01:02 pm Mark Turansky wrote: > var obj = { > "prop1":"somevalue", > "prop2":"another value", > "prop3":{ > "prop4":prop1 // prop1 is undefined here > } > } > > in the above object, prop4's value is undefined. likewise, it is undefined > if the value is obj.prop1. > > Is there any way to get values from the outer object (obj) and use a value > in the inner object (prop3) ? Not in ECMA-262 Edition 3. In SpiderMonkey, you can use sharp variables (modeled after Common Lisp's notation): var obj = #1={ prop1: "fee", prop2: "foo", prop3: { prop4: #1# } }; /be .