JSON.parser()解析的时候按照数字大小进行自动排序…我想按照源数据排序。怎么弄… 比如: 源数据"data":{"70":24442,"7080":106,"7000":45,"71":29,"7088":18,"7081":13,"72":13,"543":12,"7080":12,"9080":12} 解析之后: data: { '70’: 24462, '71’: 29, '72’: 13, '543’: 12, '6080’: 12, '7000’: 45, '7080’: 106, '7081’: 13, '7088’: 18, '9080’: 12 }
8 回复
@flybears 那就让后台返回一个对象数组给你不行吗?例如,
"data": [
{'70': 24463},
{'71': 29},
{'72': 13},
{ '7088': 18},
{ '9080': 12}
]