I have this JSON Object:
{
"content":
{
"data":
{
"totalCost":244112,
"currency":"USD",
"summary": [
{
"category": "NewCars",
"count": 2,
"cost": 91233,
"details": [
{
"name": "Ferrari",
"Model": "Enzo",
"condtion": "Excellent",
"kms": 10000,
"Year": 2009,
"cost": 69864
},
{
"name": "RollsRoyce",
"Model": "Ghost",
"condtion": "OK",
"kms": 10000,
"Year": 2006,
"cost": 21369
}
]
},
{
"category": "UsedCars",
"count": 2,
"cost": 146464,
"details": [
{
"name": "Buggati",
"Model": "Veyron",
"condtion": "Excellent",
"kms": 10000,
"actionYear": 2011,
"cost": 85500
},
{
"name": "Lamborgini",
"Model": "Aventador",
"condtion": "OK",
"kms": 10000,
"Year": 2010,
"cost": 60964
}
]
},
{
"category": "TwoWheelers",
"count": 1,
"cost": 6415,
"details": [
{
"name": "Suzuki",
"Model": "Hayabusa",
"condtion": "Bad",
"kms": 10000,
"Year":2009,
"cost": 6415
}
]
}
]
}
,"metaData":
{
"title":"Details"
}
}
,"status":200
}
Is there a way to sort the above JSON on the inner keys like name, model, condition, kms, year and cost in Javascript
Thanks in advance. Any help would be appreciated.
P.S. New to JSON and scripts