If I have a nested set of simple old javascript objects (for example, that were returned from JSON), how can I use them in Ember.js objects (or at least to work with binding functionality)?
For example, if I have an object like:
var x = {
bar: {
baz: "quux"
}
}
Then I turn this into an Ember object:
var y = Ember.Object.create(x);
Then setting the value to "baz" will not update any views that I have, because it is a regular js object, not an Ember object.
I know that I can just jump to object keys recursively and do Ember.Object.create all the way down, but is there an alternative approach?
source
share