I have this array of objects:
let a =
[{
fecha: '2022-10-28',
txt: 'some text',
},{
fecha: '2022-10-26',
txt: 'some text',
},{
fecha: '2022-10-27',
txt: 'some text',
}]
If I try this, it returns the array untouched:
a.sort((c,d) => c.fecha > d.fecha)
Even though, this test throws a boolean:
a[0].fecha > a[1].fecha // true
I don't understand.