toJSON

Creates a plain JavaScript object which contains all fields of the ObservableObject.

Returns

Object—Contains only the fields of the ObservableObject.

Example

<script>
var observable = new kendo.data.ObservableObject({ person: { name: "John Doe" } });
var json = observable.toJSON();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(JSON.stringify(json)); // outputs {"person":{"name":"John Doe"}}
</script>
In this article