I tried to call from child object a parent attribute
var parentObj = { attr1:1, attr2:2, childObj:{ method1:function(){ r
This can be done with the power of closures!
var Construct = function() { var self = this; this.attr1 = 1; this.attr2 = 2; this.childObj = { method1: function () { return self.attr1 * self.attr2 } } } var obj = new Construct();