美好的一天!如何使用EXTjs解析JSON树结构以将它们带到表视图?下面是我想把它放到网格的结构,怎么做?如何设置模型和存储?
[
{"WorckGroup":"3D",
"Statistics":[
{"Specialist":"V A K","SCallCount":64,"AverageDuration":0.1136067},
{"Specialist":"K T A","SCallCount":170,"AverageDuration":0.1057270},
{"Specialist":"L A V","SCallCount":71,"AverageDuration":0.4269940}]},
{"WorckGroup":"GPSK",
"Statistics":[
{"Specialist":"B A V","SCallCount":60,"AverageDuration":0.1109374},
{"Specialist":"K K A","SCallCount":17,"AverageDuration":0.1125816}]},
{"WorckGroup":"RG",
"Statistics":[
{"Specialist":"K A F","SCallCount":128,"AverageDuration":0.0624402},
{"Specialist":"O A V","SCallCount":115,"AverageDuration":0.3808017},
{"Specialist":"F E U","SCallCount":74,"AverageDuration":0.2172953}]}
]
| 3D | V A K | 64 | 0.1136067 |
| 3D | K T A | 170 | 0.1057270 |
...
| RG | F E U | 74 | 0.2172953 |
答案 0 :(得分:0)
该数据结构看起来适用于树形网格。
http://docs.sencha.com/extjs/4.2.1/#!/example/build/KitchenSink/ext-theme-neptune/#tree-grid
否则,您可以在ajax请求中处理响应以循环遍历数据并在商店中使用loadData方法。