I have a json datasource that looks like:
And I would like to map the address fields in a kendo Grid.
I tried setting the schema based on the "Binding to XML" example:
But I'm getting some js error (q is undefined).
What's the correct way of doing this?
{
"people"
: [{
"name"
:
"John Smith"
,
"phone"
:
"(519) 420-2391"
,
"address"
: {
"street"
:
"123 Main St"
,
"city"
:
"Someplace"
}
}]
}
And I would like to map the address fields in a kendo Grid.
I tried setting the schema based on the "Binding to XML" example:
new
kendo.data.DataSource({
data: people,
schema: {
type:
'json'
,
data:
'people'
,
model: {
fields: {
name:
'name'
,
phone:
'phone'
,
address_street:
'address/street'
,
address_city:
'address/city'
}
}
}
})
But I'm getting some js error (q is undefined).
What's the correct way of doing this?