i want to sort my json response by date ,here is the javascript function
function successCallback(responseObj){
$.each(responseObj.allRecom.recom,function(index){
var data=JSON.stringify(responseObj); //contains json response
alert(responseObj.allRecom.recom[index].recomDate);//it contains date value from response.
var date=new Date(responseObj.allRecom.recom[index].recomDate);
date=date.toLocaleString(); //converted to local date string
});
}
now what i want is whatever the response will be come ,it should be sorted by date.thanks