var array = [(Int, String)]()
I need the pairs in the array sorted in ascending order by the value of the Int.
array = [(2, "is"), (0, "Hello"), (1, "this"), (3, "Ben")]
I need this to return:
array = [(0, "Hello"), (1, "this"), (2, "is"), (3, "Ben")]
I think some variation of the following should work, but I can't figure out how to set it up.
array.sortInPlace()