I'm trying to sort a 2D array based on a specific value, here's the array in question:
[
[
{
"Category": "Food",
"Label": "Trsttzp",
"Price": "45",
"Date": "01/12/2018"
}
],
[
{
"Category": "Food",
"Label": "Trst",
"Price": "65",
"Date": "01/13/2018"
}
],
[
{
"Category": "Food",
"Label": "Ts",
"Price": "99",
"Date": "01/02/2018"
}
],
[
{
"Category": "Food",
"Label": "Ts",
"Price": "99",
"Date": "01/12/2018"
}
],
[
{
"Category": "Food",
"Label": "Haa",
"Price": "55",
"Date": "01/12/2018"
}
],
[
{
"Category": "Food",
"Label": "qsd",
"Price": "6",
"Date": "01/12/2018"
}
]
]
I attempted to use the "fast-sort" library from npm to sort it by Date, but it doesn't seem to be working. It seems like the issue lies in the fact that this library doesn't support 2D arrays. I'm having trouble finding a solution using TypeScript or another library that supports 2D arrays. Help!