UPDATE: Looks like we're headed for a bounty. First time ever for me.
My goal is to adjust this code to get results ordered by date.
CODE SAMPLE
$.when( $.getJSON(url0), $.getJSON(url1), $.getJSON(url2), $.getJSON(url3),$.getJSON(url4), $.getJSON(url5),$.getJSON(url6),$.getJSON(url7) ).done( function() {
$.each(arguments, function(index, result) {
var data = result[0];
utcday = data[0].createdOn;
ltrDay = moment.utc(utcday).format("DD MMM YY");
console.log(ltrDay);
});
});
This code returns the results ordered by the getJSON
url I'm calling.
It is the desired behavior in most cases.
However, I now need to return the results ordered by date too for other cases (descending order, newest first).