Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. // Order the stepLists from the the smallest to the highest.
  2. // object properties are in random order so browsers may
  3. // change the order of the properties on an object.
  4. // therefore me sut set the order manually to granite
  5. var keys = Object.keys(sale.stepsList).sort();
  6. var orderedSteps = {};
  7. angular.forEach(keys, function(key){
  8. this[key] = sale.stepsList[key];
  9. }, orderedSteps);
  10. console.log(orderedSteps);
  11. sale.stepsList = orderedSteps;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement