I'm returning a Map from java spring controller to the angularjs controller.
The Map in the java controller contains the following keys in the order 11,12,14,15,18,22,25,27,34,29
mapped to a value which i'm sending to the js controller. Issue is when i'm iterating and showing the response on the webpage, it is showing result in the sorted manner like 11,12,14,15,18,22,25,27,29,34
.
How to prevent this and show in the order i have sent from the java controller (i.e.,11,12,14,15,18,22,25,27,34,29)
(Please note the difference is in last two values 34,29)
js code:
angular.forEach($scope.myResponse, function (value, key) {
//here the results i get are in the order 11,12,14,15,18,22,25,27,29,34.
//how to show the results as it was sent from java spring controller 11,12,14,15,18,22,25,27,34,29
});