-
Answer
Andrew
3
posts
Member since:
Jan 2011
Posted 25 Nov 2013
Link to this post
Considering the following data object:
var obj = {
person: {
name: "Holmes"
address: {
apt: 221B,
street: "Baker",
city: "London"
}
}
}
And the viewModel built from the above object to be used in a MVVM presentation:
var viewModel = kendo.observable(obj);
kendo.bind(..., viewModel)
After the changes have been done to the viewModel by UI,
I would like to extract the original object as a whole (rather then field by field)
with the changes incorporated in it.
The extracted object would be then sent to another part of the application for processing
and is expected to have no additional events/functions/types built into it.
In other words, I would like to detach the "observable" from the object.
How can I do that?
Thanks,
Andrew
-
-
Answer
Alexander Valchev
Admin
Posted 27 Nov 2013
Link to this post
Hello Andrew,
To do that you can use the toJSON method of the observable object.
Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework -
download Kendo UI now!
-
-
Andrew
3
posts
Member since:
Jan 2011
-