Here’s a GOJS example that uses a Javascript Proxy to provide property paths…“deep.dot.path” properties to allow drilling into an object to dynamically get/set properties. I basically wrapped the code in deep-dot - npm into a Javascript Proxy, and provided more catcher methods to handle the required cases in GoJs (eg. iterating keys, key property descriptors, etc.). This would allow you to create go-bindings using the “deep.dot.path” as absolute binding keys on the fly. NOTE: I don’t support arrays in this example.
Yes, that’s a clever way to support property paths in data binding. But it requires the use of specially defined properties on the data objects, much as Backbone, Ember, and Knockout do. I suspect that get and set performance is poor too, although I have not tested that.
There is also a problem with it (version 3/5) at the moment, I think I didn’t implement “getOwnPropertyDescriptor” property and GOJS requires it (I’m quite clueless as to what getOwnPropertyDescriptor is…to be honest). Anyway of fixing it? When i insepected the data element when the Graph element is dragged onto the Stage, it incidentally produces an actual extra string property called “obj.name”:xxxx inside the object based on the console.log trace, instead of only setting { obj:{name:xxxx} }. I dunno why…