

Clean solution for nested observable objects - gamerpro

I am trying to understand the current standard for observables in javascript. Here is a simple thing that I would like to do.<p>This is the structure of the object that we are trying to solve for
var cust =  {
firstname : &quot;Gamer&quot;,
lastname : &quot;Pro&quot;,
address : { line1 : &quot;1600 Amphitheatre Pkwy&quot;,
line2: &quot;&quot;,
city: &quot;Mountain View&quot;, state: &quot;CA&quot;, zip:&quot;94040&quot;
}
}<p>Q1: If I want to watch changes on the object.
Lets say update the street address line 1, what would be the general format to modify it.<p>Should I do custObservable.set(&quot;adresss.line1&quot;) or get the address and then do a set?<p>Q2: In the case of Q1, what &quot;change&quot; would i receive on the observable? Should I get one for adress or should i get one for street address.line1? Should I get two update one for line1 and one for address<p>The question doesn&#x27;t assume any frameworks specifically. Feel free to share how this is solved in your favorite frameworks.
======
abss
My approach is to extend OOP concepts with embedded types and have two types
of events: PropertyChange and DocumentChange.

Curently in Shape, the public MVVM framework I have, those concepts are only
partially developed.

Contact me privately for details.

