我收到以下json对象:
{
"ActivitySummary": [
{
"Client": "TOTAL",
"RGUs": "18",
"CANCELLED": "1",
"PENDING": "17"
},
{
"Client": "ATT",
"RGUs": "2",
"CANCELLED": "1",
"PENDING": "1"
}
]
}
但是当我使用jQuery.parseJSON()
解析这个对象时,它改变了属性的顺序,即Client
在第二位移动,'取消'到第一位,依此类推:
var array=[
{CANCELLED:"1",Client:"TOTAL", RGUs:"18", PENDING:"1" },
{CANCELLED:"1",Client:"ATT", RGUs:"2", PENDING:"1"}
];
这就是我解析json的方式:
success: function (obj) {
var array = jQuery.parseJSON(obj.data);
}
我如何保留订单?请帮忙