论坛首页 Web前端技术论坛

Extjs 获取 json数据(List嵌套)

浏览 4579 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2012-08-31  
EXT
后台输出json数据格式:
{"__params":null,"jsonStr":null,"limit":20,"start":0,"success":true,"totalCount":3,"voteItemPOJOI":null,"voteOption":null,"voteSubject":null,"voteSubjectList":[{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voteOptions":[{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":50844,"voOption":"前往俄","voteSubject":null},{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":50845,"voOption":"前往俄","voteSubject":null}],"vsId":50843,"vsIsindex":0,"vsOverTime":"2012-08-15T12:00:00","vsTitle":"前往俄","vsType":1},{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voteOptions":[{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":50804,"voOption":"网站整体不错.继续努力","voteSubject":null},{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":50802,"voOption":"投票页面美观点","voteSubject":null},{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":50805,"voOption":"文章栏目需要改善","voteSubject":null},{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":50803,"voOption":"首页需要改善","voteSubject":null}],"vsId":50801,"vsIsindex":1,"vsOverTime":"2012-08-31T00:00:00","vsTitle":"网站首页改变如何? 还有什么地方需要改善的?","vsType":2},{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voteOptions":[{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":2,"voOption":"很好","voteSubject":null},{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":1,"voOption":"很好","voteSubject":null},{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":3,"voOption":"很好","voteSubject":null},{"actionErrors":[],"actionMessages":[],"errorMessages":[],"errors":{},"fieldErrors":{},"locale":"zh_CN","texts":null,"voId":4,"voOption":"很好","voteSubject":null}],"vsId":118,"vsIsindex":0,"vsOverTime":"2012-08-31T00:00:00","vsTitle":"要想搞清楚一个文件的两个版本之间的不同之处并不是件简单的任务,","vsType":1}],"vsOverTime":null,"vsTitle":null,"vsType":null}

我用extjs 获取到了voteSubjectList这个list 但是voteSubjectList 他里包含了一个 voteOptions 获取外面的voteSubjectList  获取到了.voteOptions 怎么获取.最好能伤员吗.或者讲解一下思路.Extjs 初学者 先谢过了.
   发表时间:2012-08-31  
这么一会来看了这么多人.提点意见什么或者哪里看的不太清楚撒的.别让帖子沉下去了..
0 请登录后投票
   发表时间:2012-08-31  
{
    "__params": null,
    "jsonStr": null,
    "limit": 20,
    "start": 0,
    "success": true,
    "totalCount": 3,
    "voteItemPOJOI": null,
    "voteOption": null,
    "voteSubject": null,
    "voteSubjectList": [
        {
            "actionErrors": [],
            "actionMessages": [],
            "errorMessages": [],
            "errors": {},
            "fieldErrors": {},
            "locale": "zh_CN",
            "texts": null,
            "voteOptions": [
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 50844,
                    "voOption": "前往俄",
                    "voteSubject": null
                },
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 50845,
                    "voOption": "前往俄",
                    "voteSubject": null
                }
            ],
            "vsId": 50843,
            "vsIsindex": 0,
            "vsOverTime": "2012-08-15T12:00:00",
            "vsTitle": "前往俄",
            "vsType": 1
        },
        {
            "actionErrors": [],
            "actionMessages": [],
            "errorMessages": [],
            "errors": {},
            "fieldErrors": {},
            "locale": "zh_CN",
            "texts": null,
            "voteOptions": [
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 50804,
                    "voOption": "网站整体不错.继续努力",
                    "voteSubject": null
                },
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 50802,
                    "voOption": "投票页面美观点",
                    "voteSubject": null
                },
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 50805,
                    "voOption": "文章栏目需要改善",
                    "voteSubject": null
                },
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 50803,
                    "voOption": "首页需要改善",
                    "voteSubject": null
                }
            ],
            "vsId": 50801,
            "vsIsindex": 1,
            "vsOverTime": "2012-08-31T00:00:00",
            "vsTitle": "网站首页改变如何? 还有什么地方需要改善的?",
            "vsType": 2
        },
        {
            "actionErrors": [],
            "actionMessages": [],
            "errorMessages": [],
            "errors": {},
            "fieldErrors": {},
            "locale": "zh_CN",
            "texts": null,
            "voteOptions": [
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 2,
                    "voOption": "很好",
                    "voteSubject": null
                },
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 1,
                    "voOption": "很好",
                    "voteSubject": null
                },
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 3,
                    "voOption": "很好",
                    "voteSubject": null
                },
                {
                    "actionErrors": [],
                    "actionMessages": [],
                    "errorMessages": [],
                    "errors": {},
                    "fieldErrors": {},
                    "locale": "zh_CN",
                    "texts": null,
                    "voId": 4,
                    "voOption": "很好",
                    "voteSubject": null
                }
            ],
            "vsId": 118,
            "vsIsindex": 0,
            "vsOverTime": "2012-08-31T00:00:00",
            "vsTitle": "要想搞清楚一个文件的两个版本之间的不同之处并不是件简单的任务,",
            "vsType": 1
        }
    ],
    "vsOverTime": null,
    "vsTitle": null,
    "vsType": null
}

这是格式过后的json格式.
0 请登录后投票
   发表时间:2012-08-31  
我现在想要获取的就是voteSubjectList 里面的voteOptions 对象.
0 请登录后投票
   发表时间:2012-09-01  
是我见到的最垃圾的一个问题,
不是在于问题的简易程度,
而是在于对问题描述的文字以及提供的数据
0 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics