I have an array that is currently sorted by the first value:
[ [ 'a', 3 ],
[ 'c', 3 ],
[ 'd', 1 ],
[ 'e', 2 ],
[ 'f', 1 ],
[ 'g', 1 ],
[ 'i', 7 ],
[ 'l', 3 ],
[ 'o', 2 ],
[ 'p', 2 ],
[ 'r', 2 ],
[ 's', 3 ],
[ 't', 1 ],
[ 'u', 2 ],
[ 'x', 1 ] ]
I would like to sort the digits in descending order to get:
[ [ 'i', 7 ],
[ 'a', 3 ],
[ 'c', 3 ],
[ 'l', 3 ],
[ 's', 3 ],
[ 'e', 2 ],
[ 'o', 2 ] ......]