I currently have an array of arrays that I need to sort based on the date value within one of the arrays. Here is the example:
This is the initial array:
arrayOfArray = [
["Date", "01/02/2017", "02/02/2016"],
["Temperature", "19", "16"],
["Humidity", "80%", "86%"]
]
I want to sort it like this:
newArrayOfArray = [
["Date", "02/02/2016", "01/02/2017"],
["Temperature", "16", "19"],
["Humidity", "86%", "80%"]
]
The sorting should be done based on the date array in descending order. How can I achieve this? Thank you in advance.