For Objects
If you are dealing with an object, reverse() won't work! Instead you can do this to maintain the order.
$.each(Object.keys(myObj).reverse(),function(i,key){
var value = myObj[key];
//you have got your key and value in a loop that respects the order, go rock!
});