get
Gets the value of the specified field. Inherited from kendo.data.ObservableObject
. For more information and examples, refer to the get
API reference.
Example
<script>
var Product = kendo.data.Model.define({
fields: {
name: { type: "string" },
price: { type: "number" },
category: { type: "string", defaultValue: "Electronics" }
}
});
var product = new Product({ name: "Smartphone", price: 599 });
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(product.get("name")); // outputs "Smartphone"
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(product.get("price")); // outputs 599
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(product.get("category")); // outputs "Electronics" (default value)
</script>
In this article