Backbone.js get and set nested object attribute

While this.model.get(“obj1”).myAttribute1 is fine, it’s a bit problematic because then you might be tempted to do the same type of thing for set, i.e. this.model.get(“obj1”).myAttribute1 = true; But if you do this, you won’t get the benefits of Backbone models for myAttribute1, like change events or validation. A better solution would be to never nest … Read more