kasim mohamed

kasim mohamed

  • 2k
  • 37
  • 1.9k

Filter Time column greater than zero in typescript

Sep 20 2020 1:08 AM
I have an object array like below
[{id:101, StartTime: "2020-08-26T09:00:00", EndTime: "2020-08-26T18:00:00", Effort: "09:00:00"},
{id:102, StartTime: "2020-08-26T08:30:00", EndTime: "2020-07-02T19:25:00", Effort: "10:55:00"},
{id:103, StartTime: "2020-07-02T00:00:00", EndTime: "2020-07-02T00:00:00", Effort: "00:00:00"},
{id:104, StartTime: "2020-08-26T09:00:00", EndTime: "2020-08-26T18:00:00", Effort: "09:00:00"},
{id:105, StartTime: "2020-09-18T10:00:00", EndTime: "2020-09-18T21:00:00", Effort: "11:00:00"},
{id:106, StartTime: "2020-07-02T00:00:00", EndTime: "2020-07-02T00:00:00", Effort: "00:00:00"},
{id:107, StartTime: "2020-07-02T00:00:00", EndTime: "2020-07-02T00:00:00", Effort: "00:00:00"}]
I need to get the object where the Effort column should be greater than zero minutes
i need result like below
[{id:101, StartTime: "2020-08-26T09:00:00", EndTime: "2020-08-26T18:00:00", Effort: "09:00:00"},
{id:102, StartTime: "2020-08-26T08:30:00", EndTime: "2020-07-02T19:25:00", Effort: "10:55:00"},
{id:104, StartTime: "2020-08-26T09:00:00", EndTime: "2020-08-26T18:00:00", Effort: "09:00:00"},
{id:105, StartTime: "2020-09-18T10:00:00", EndTime: "2020-09-18T21:00:00", Effort: "11:00:00"}]
 
Thanks 

Answers (1)