我正在进行API调用,并且当我不希望它进行数据排序时。 API看起来像这样:
{"AM Meetings/HR":{"starting-time":"8:00","end-time":"9:05"},"C":{"starting-time":"9:10","end-time":"10:35"},"Community":{"starting-time":"10:40","end-time":"11:25"},"D":{"starting-time":"11:30","end-time":"12:55"},"Lunch":{"starting-time":"13:00","end-time":"13:45"},"E":{"starting-time":"13:50","end-time":"15:15"}}
所以,它是AM Meetings / HR,C,Community,D,Lunch和E.但是,当我使用这个AngularJS电话时:
$scope.getCurrentDay = function(){
$http.get("/api/currentDay/")
.success(function(data){
$scope.currentDay = data;
console.log(data);
});
}
currentDay和日志显示为AM Meetings / HR,C,Community,D,E,Lunch,按字母顺序排序。
有没有办法让它不按字母顺序排序?