If I have an object like this:
obj = {a:{aa:1}, b:2};
and I want to create a shortcut variable (pointer to obj.a.aa) x like this:
x = obj.a.aa;
and then I want to assign the value 3 to obj.a.aa using x like this:
x = 3; // I would like for obj.a.aa to now equal 3
console.log(obj.a.aa); // 1 (I want 3)
How can I set x up to result in the value 3 going into obj.a.aa?
I understand that obj.a.aa is a primitive, but how can I define a variable that points to it which I can then use to assign a value to the property?