My job involves handling an array of objects, each object containing various properties:
comments:""
id:1
inProgress:false
jobDescription:null
lastUpdateDate:"07/08/2016"
lastUpdatedByUser:"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="641c1c1c240506074a070b09">[email protected]</a>"
product:"Chicken"
status:Object
templateName:"Standard Template"
uploadDate:"07/08/2016 10:36:01"
I need to implement a function in Angular that can iterate through the entire list and organize the objects based on their upload dates, with the most recent appearing first.
Although I attempted to achieve this using the following code, it did not produce the desired result:
vm.uploads = $filter('orderBy')(vm.uploads, vm.uploads[0].uploadDate, reverse);