I have the following array:
[
'01/12/2020',
'01/11/2020',
'01/10/2020',
'01/09/2020',
'01/08/2020',
'01/07/2020',
'01/06/2020',
'01/05/2020',
'01/04/2020'
] [
1044, 2055, 352,
183, 76, 19,
2, 15, 102
]
in this array, each number belongs to each date.
if I sort the dates, naturally, they won´t match the values. How could I make a proper sort so that dates are sorted in ascending order and values match? This is what I would expect to get:
[
'01/04/2020',
'01/05/2020',
'01/06/2020',
'01/07/2020',
'01/08/2020',
'01/09/2020',
'01/10/2020',
'01/11/2020',
'01/12/2020'
] [
102, 15, 2,
19, 76, 183,
352, 2055, 1044
]