I have an array that has a startTime. I want to get items where startTime in between 2020-12-10 09:30:00 and 2020-12-10 13:20:00. I am using the filter method to get the items from the array.
startTime>'2020-12-10 09:30:00' // is working, returns array with 6 items
but when i add startTime>'2020-12-10 09:30:00' && startTime<'2020-12-10 13:20:00' // returns null
not able to understand why it not filtering the result when I use less than
here is my code
var empStart = empShift.filter(item => {
return item.startTime>'2020-12-10 09:30:00' && item.startTime<'2020-12-10
13:20:00'
})