Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Order the stepLists from the the smallest to the highest.
- // object properties are in random order so browsers may
- // change the order of the properties on an object.
- // therefore me sut set the order manually to granite
- var keys = Object.keys(sale.stepsList).sort();
- var orderedSteps = {};
- angular.forEach(keys, function(key){
- this[key] = sale.stepsList[key];
- }, orderedSteps);
- console.log(orderedSteps);
- sale.stepsList = orderedSteps;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement