- 注册时间
- 2017-9-21
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 22
- 精华
- 0
- 帖子
- 0
|
您好,请问,如何解决JSON嵌套的问题,怎么把数据获取出来呢??
JSON:- [{"supplierList":[{"id":2,"supplierId":"XYD-xydxyd","supplierName":"xydxyd","supplierContacts":null,"supplierCall":null,"supplierAddress":null,"remarks":""}],"typeList":[{"id":2,"typeId":null,"typeNum":"WL-001","typeName":"散热器WL-001","typeDesc":null}],"id":2,"partsSummary":"","partsDanhao":"XYD-WLRK-2017919-002","supplierId":"XYD-xydxyd","typeNum":"WL-001","partsName":"123","unit":"个","buycounts":123,"sellcounts":1,"flag":"1","date":"2017-09-19 18:07:13","remarks":""},{"supplierList":[{"id":4,"supplierId":"XYD-xydxyd","supplierName":"xydxyd","supplierContacts":null,"supplierCall":null,"supplierAddress":null,"remarks":"321"}],"typeList":[{"id":4,"typeId":null,"typeNum":"WL-001","typeName":"散热器WL-001","typeDesc":null}],"id":4,"partsSummary":null,"partsDanhao":"XYD-WLCK-2017920-001","supplierId":"XYD-xydxyd","typeNum":"WL-001","partsName":"123","unit":"个","buycounts":1,"sellcounts":-321,"flag":"2","date":"2017-08-20 11:46:54","remarks":"321"},{"supplierList":[{"id":5,"supplierId":"XYD-IBM","supplierName":"IBM","supplierContacts":null,"supplierCall":null,"supplierAddress":null,"remarks":"测试你能如何!"}],"typeList":[{"id":5,"typeId":null,"typeNum":"WL-001","typeName":"散热器WL-001","typeDesc":null}],"id":5,"partsSummary":null,"partsDanhao":"XYD-WLCK-2017920-002","supplierId":"XYD-IBM","typeNum":"WL-001","partsName":"中央处理散热器","unit":"台","buycounts":1,"sellcounts":100,"flag":"2","date":"2017-09-20 15:17:19","remarks":"测试你能如何!"}]
复制代码 字段::- <div field="typeName" width="100" headerAlign="center" renderer="getType" allowSort="true">类别</div>
复制代码 function我了创建了,但是没效果::- function getType(value) {
- alert(value.typeNum);
- return value.typeNum;
- }
复制代码 大神,帮我一下啊!!!谢谢!!!
|
|