How to sort array "timeline" by descending date order in PHP?
"bookingAnalysis": {
"timeline": [
{
"date": "2017-12-02",
"count": 1,
"peopleCount": 2
},
{
"date": "2017-12-01",
"count": 1,
"peopleCount": 4
},
{
"date": "2017-12-08",
"count": 1,
"peopleCount": 4
},
{
"date": "2017-12-29",
"count": 1,
"peopleCount": 2
},
{
"date": "2018-01-12",
"count": 1,
"peopleCount": 2
},
{
"date": "2018-01-19",
"count": 1,
"peopleCount": 2
},
{
"date": "2018-01-21",
"count": 1,
"peopleCount": 2
},
{
"date": "2018-01-27",
"count": 1,
"peopleCount": 2
},
{
"date": "2018-01-10",
"count": 1,
"peopleCount": 6
},
],
}