I am using DataSource to consume data from a remote resource, like this:
DataSource.Products = new kendo.data.DataSource({
transport: {
read: {
url: "https://wwww.",
dataType: "json",
type: "GET"
}
},
});
My response should be JSON like this:
{
"status": {
"http_code": 200
},
"contents": {
"totalSize": 5,
"done": true,
"records": [
{
"attributes": {
"type": "",
"url": ""
},
"Name": ""
},......
]
At minimum I would just like to print the response:
DataSource.Products.fetch(function(){
var data = this.data();
console.log(data);
});
But the output is not what I expect, in fact I can't see the underlying data.
Let's say for example I want to see the records array, can I do data.contents.records?
DataSource.Products = new kendo.data.DataSource({
transport: {
read: {
url: "https://wwww.",
dataType: "json",
type: "GET"
}
},
});
My response should be JSON like this:
{
"status": {
"http_code": 200
},
"contents": {
"totalSize": 5,
"done": true,
"records": [
{
"attributes": {
"type": "",
"url": ""
},
"Name": ""
},......
]
At minimum I would just like to print the response:
DataSource.Products.fetch(function(){
var data = this.data();
console.log(data);
});
But the output is not what I expect, in fact I can't see the underlying data.
Let's say for example I want to see the records array, can I do data.contents.records?