I have a json file with a field date in it, which is not in a specific format and it should stay like this. I am wondering how can is sort this json with php, so the records with the most recent date appear in the beginning in the json and so on until the end in descending order.
I tried a lot of things, but nothing worked for me.
Here is how the json looks :
[
{"fullName":"John Doe","userName":"user2",
"phone":"+1234124512","email":"[email protected]",
"date":"2016-11-03","time":"1pm","reason":"some reason",
"isApproved":1,"label":"success","status":"Approved"},
{"fullName":"Robert Royce","userName":"user1",
"phone":"+4460475640","email":"[email protected]","date":"2016-11- 17",
"time":"130pm","reason":"some reason",
"isApproved":1,"label":"success","status":"Approved"},
{"fullName":"Pesho Zdr","userName":"user4",
"phone":"+4560477640","email":"[email protected]","date":"2016-11-17",
"time":"130pm","reason":"some reason",
"isApproved":0,"label":"success","status":"Approved"}
]