来自json的ExtJS组合框数据

时间:2011-03-18 15:39:24

标签: json extjs

我有json:

{"total":100, "category": [Village, City, School, HighSchool]}

对于extjs组合框:

reader: new Ext.data.JsonReader({
root: 'category'},
[{name: 'category'}])
当我看到它显示的萤火虫时,它并没有让我的数据显示出来

求你帮忙......

1 个答案:

答案 0 :(得分:1)

我没有看到firebug显示的错误,但是你的JSON无效。尝试:

{"total":100, "category": ["Village", "City", "School", "HighSchool"]}
//values in array should be in double quotes