How can i sort the following data response of ui-grid by date
this.$http.get(url)
.success(data => {
this.$scope.gridOptions.data = data //.slice(firstRow, firstRow + paginationOptions.pageSize);
}).finally(() => { this.$scope.loading = false; this.$scope.loadAttempted = true; });
I get the reponse as an array of objects and one of the properties is of type DOB, which is the one i want to sort by.
here goes a sample of my array
[
{
"Name":"John",
"DOB" : "12/07/1987"
}
{
"Name":"Jack",
"DOB" : "12/07/1989"
}
{
"Name":"Sara",
"DOB" : "12/07/1980"
}
]
Thanks,