1
How to order the "Timeline" array in 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
},
],
}
the die to be ordered comes so in format
json
?– novic
Yes, I’m getting a json and I need to order it.
– Daywison Ferreira Leal
You need to get Jason full, even though the answer doesn’t change much
– novic