My goal is to filter out the elements in an array that have a date (converted from string) greater than a specific date.
_this.downloadData.forEach(_d => _d.LogTime = _d.LogTime.toString());
console.log(_this.downloadData.filter(x=>new Date(x.LogTime) > new Date('3/11/2019 7:29:12 AM')));
However, the filter function always returns zero items.
This is what the array looks like:
[0 … 99]
0:
CPUStat:""
Connectivity:""
DiskStatus:""
HostName:"HOSTname"
LastRebootStatus:null
LogTime:"Mon Mar 11 2019 07:39:12 GMT+0530 (India Standard Time)"
__proto__:
Object