我有一个像这样的对象:
{ "01":"111","02":"222","11":"AAA","12":"BBB"}
。但是在JSON.parse之后,对象改变了它的顺序,如{"11":"AAA","12":"BBB","01":"111","02":"222"}
。见http://jsfiddle.net/stxh/3WV8Y/
代码:
var str=JSON.parse('{"01":"111","02":"222","11":"AAA","12":"BBB"}');
alert( JSON.stringify(str) );
我可以保留JSON.parse的订单吗?