I have this array:
[
["name1", { count: 20 }],
["name2", { count: 10 }]
]
How would I go about sorting this array by the value of count?
I have tried using the sort function,
const sort = Array.sort((a, b) => b.count - a.count);
But this didn't change anything.