I have an array of objects -
[
{ name:'abc',
lRange: '2020-01-01',
hRange: '2020-01-22',
},
{ name:'abc',
lRange: '2020-01-01',
hRange: '2020-01-22',
},
{ name:'def',
lRange: '2020-01-15',
hRange: '2020-01-30',
},
{ name:'ghi',
lRange: '2020-02-10',
hRange: '2020-02-22',
}
]
I need to get the min Date and Max Date range combining all the dates lRange and hRange dates - there will be a overlap of the dates too.
I have tried sorting by date times but that is not giving me the correct range. any ideaS?