dsDetails = new kendo.data.DataSource({
transport: {
read: {
url: PRODUCTDETAILAPI,
dataType: "json",
data: { "site_key": SITEKEY, "id": id }
}
}
});
dsDetails.fetch(function() {
var myData = dsDetails.data();
console.log(myData);
// bind stuff here
});
The API call is returning the following data (so I know that is working):
{
"main_category": "Gifts",
"expires_on": null,
"html_address": "678 Sterling Drive\u003Cbr/\u003ESuite 102\u003Cbr/\u003ESanford FL 32771",
"address": "678 Sterling Drive Suite 102, Sanford Florida 32771",
"status": "Visible",
"rating": 5, "sub_category": "Gift Baskets",
"quantity": 92, "categories": ["Gifts: Gift Baskets"], "title": "Luggage Duffel",
"price": 12210, "images": [], "short_address": "Sanford FL",
"short_title": "Luggage Duffel",
"posted_at": "2011/09/23",
"category": "Gifts: Gift Baskets",
"id": "product_listing_88",
"price_note": "",
"description": "Black, 60 in long",
"seller": "Morning Star Media Group"
}
When I run this code I get the following error:
Uncaught TypeError: Object #<Object> has no method 'slice'
Edit: Based on the selected answer, I replace this kendo dataset code with a standard jQuery .ajax call and it worked fine. My brain was temporarily stuck within the confines of the Kendo framework.