json数据如何倒序
如题,比如我有一个这样的JSON数据[{"name":"0","content":"2","parentid":"1"},{"name":"0","content":"1...
如题,比如我有一个这样的JSON数据[{"name":"0","content":"2","parentid":"1"},{"name":"0","content":"1","parentid":"0"}]请问如何讲里面的数据倒序。。
展开
展开全部
json数据倒序语句如下所示:
var searchTplStore = new Ext.data.JsonStore({ autoDestroy: true, root:"倒序排列", forceFit: true, scrollOffset: 0 }, enableDragDrop : true,
另外json数据怎么按照固定的顺序输出呢?用到了List和JSONArray
这是想要的结果:["id":"1","text":"哈哈","children":[{"id":"1","text":"01"},{ "id":"2","text":"02" },{"id":"3","text":"03" }]]
但是输出是这样的["children":[{"id":"1","text":"01"},{ "id":"2","text":"02" },{ "id":"3","text":"03" }] ,"id":"1","text":"哈哈"]
var searchTplStore = new Ext.data.JsonStore({ autoDestroy: true, root:"倒序排列", forceFit: true, scrollOffset: 0 }, enableDragDrop : true,
另外json数据怎么按照固定的顺序输出呢?用到了List和JSONArray
这是想要的结果:["id":"1","text":"哈哈","children":[{"id":"1","text":"01"},{ "id":"2","text":"02" },{"id":"3","text":"03" }]]
但是输出是这样的["children":[{"id":"1","text":"01"},{ "id":"2","text":"02" },{ "id":"3","text":"03" }] ,"id":"1","text":"哈哈"]
展开全部
var searchTplStore = new Ext.data.JsonStore({ autoDestroy: true, root:"倒序排列", forceFit: true, scrollOffset: 0 }, enableDragDrop : true,
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询