Ignore me, I misread. You can pass a key function to
Do you really need to have the data as a single string? An object would make more sense.
sort
or sorted
. It will need to split the string to extract the number and use that for sorting.Do you really need to have the data as a single string? An object would make more sense.