Extjs中将后台的array数据转换为Json格式怎么做,急求

这是Array:{"count":5,"list":[[1,"你好","红楼梦","123","2015-03-10"],[2,"瑶瑶","三国演义","22","201... 这是Array:{"count":5,"list":[[1,"你好","红楼梦","123","2015-03-10"],[2,"瑶瑶","三国演义","22","2015-03-10"],[3,"祝主","西厢记","34","2015-03-17"],[4,"美美","西游记","44","2015-03-03"],[5,"瑶瑶","生物学","55","2015-03-03"]]}

这是Json:{"count":5,"list":[{"id":1,"name":"红楼梦","author":"你好","publishDate":"2015-03-10","price":"123"},{"id":2,"name":"三国演义","author":"瑶瑶","publishDate":"2015-03-10","price":"22"},{"id":3,"name":"西厢记","author":"祝主","publishDate":"2015-03-17","price":"34"},{"id":4,"name":"西游记","author":"美美","publishDate":"2015-03-03","price":"44"},{"id":5,"name":"生物学","author":"瑶瑶","publishDate":"2015-03-03","price":"55"}]}
展开
 我来答
帅惜玉sh
2015-04-03 · TA获得超过243个赞
知道小有建树答主
回答量:343
采纳率:100%
帮助的人:302万
展开全部
你在后台时 直接转json 传到前台 本来就是 下面的这种格式了

你需要加一个json包 然后直接把array数组转为 json就可以了
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式