How would you sort a multidimensional array in JavaScript?
I have an array full of arrays that contain two dates and a string. I need the main array sorted by one of the date arrays, is this possible?
data stucture:
events = [
{ date 1, date 2, string },
{ date 2, date 2, string },
]
Duplicate of sort outer array based on values in inner array, javascript
here you will find several answers, like my own
This sorts on index 2