Hi,
i am Using Icenium with kendo.mobile.min.js , jquery.min.js
i am trying to add some data to my datasource.
Let's assume i am in a for loop and every time i go through the loop i want to add some data to my dataSource.
--
var datasource = [ ];
for (var k = 0; k < subjson.length; k++) {
for (key in subjson[k]) {
if (subjson[k].hasOwnProperty(key)) {
if (key == "name") {
var arraycount = array + 1;
output = subjson[k][key]
}
// retrieve other keys, like link, image, etc.
}
}
I tried to use
i am Using Icenium with kendo.mobile.min.js , jquery.min.js
i am trying to add some data to my datasource.
Let's assume i am in a for loop and every time i go through the loop i want to add some data to my dataSource.
--
var datasource = [ ];
for (var k = 0; k < subjson.length; k++) {
for (key in subjson[k]) {
if (subjson[k].hasOwnProperty(key)) {
if (key == "name") {
var arraycount = array + 1;
output = subjson[k][key]
}
// retrieve other keys, like link, image, etc.
}
}
I tried to use
dataSource.add({
name: output });However i am not getting any luck, since it's always throwing
Object [object Array] has no method 'add'
Any ideas?
Rgds