如何在剑道网格的模型设置中将列/字段绑定到 json 的子属性(在 javascript 中)?例如,我希望网格包含列:FName、LName、Street 和 Address。基本上我想展平Web服务返回的层次结构。
剑道设置
fields: {
FName: { type: "string" },
LName: { type: "string" },
// How to map to child properties below?
Street: { field: "Address.Street" }, // this is wrong
City: { field: "Address.City" } // this is wrong
}
JSON
{
"FName": "William",
"LName ": "Shakespeare",
"Address":
{
"Address": "123 Street Ln",
"City": "Philadelphia"
}
}