I could not find any way to accomplish the task of such conversion as I could not find any means of getting Ember.js properties for the object. Ember.keys
returns only the properties I set in create
or with get
and the properties declared in Ember.extend
do not show up there. I use such properties to set up default values (e.g. []
for array properties)
Here is my dirty workaround
var newModel = JSON.parse(JSON.stringify(model));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With