I am having trouble sorting an array of tuples. Each tuple has 2 elements consisting of a string and a integer, and I need to sort them by the integer. I tried:
sort(stats, by=x->x[2])
But that doesn't seem to work.
I am having trouble sorting an array of tuples. Each tuple has 2 elements consisting of a string and a integer, and I need to sort them by the integer. I tried:
sort(stats, by=x->x[2])
But that doesn't seem to work.