I have been working off of this SO question. However, my data is arranged slightly differently.
Without going into HOW the data is retrieved, suffice it to say the resulting array looks like this
String[2][]
[0] = String[4]
[1] = String[4]
The actual data, then is as follows
data = String[2][]
data[0]
data[0][0] = "Columbia"
data[0][1] = "Chile"
data[0][2] = "Asia"
data[0][3] = "US"
data[1]
data[1][0] = "B216"
data[1][1] = "B217"
data[1][2] = "A442"
data[1][3] = "N665"
I want to sort the entire array by data[0] in alphabetical order. Yet I realized that the solution provided in the referenced SO question is working off of a different array format.
My expected result would look like
data = String[2][]
data[0]
data[0][0] = "Asia"
data[0][1] = "Chile"
data[0][2] = "Columbia"
data[0][3] = "US"
data[1]
data[1][0] = "A442"
data[1][1] = "B217"
data[1][2] = "B216"
data[1][3] = "N665"
I'm not entirely certain how to obtain these results without iterating over each element and shifting them to a new array.
Any ideas?