I have a JSON string that I'm trying to convert to a datasource then bind to one of the controls. The string looks like this:
var TestData = [ {"Category": "1", "Attributes": [{"Attribute": "A", "Attribute": "B", "Attribute": "C" }] }]
then the datasource declaration is like this:
var thisData = new kendo.data.DataSource({
data: $.parseJSON(TestData),
schema: {
model: {
fields: {
Category: { type: 'string' },
Attributes: {
Attribute: { type: 'string' }
},
}
}
}
})
When I bind to a listview and try to loop through the values in a template, it always tells me the length of the Attributes list is 1 and displays the last value ("C"). Is there something wrong in the declaration?