I have following object:
var myObject = {
attributes: { name: "dev.pus", age: 29 },
someInjectedObject: {
name: "someComponent",
action: function() {
// do something
return this.this.attributes.name; // this surely won't work :(
}
}
};
As you see I want to get myObject.attributes.name from an nested part of the object without having to observe the value.
How do I do this? How do I define a reference?
EDIT: A simple myObject.attributes isn't enough because myObject changes or better gets assigned to a new variable.