I want to sort the below json response based on an array.
{
"expanded": {
"developer": {
"numFound": 1,
"start": 0,
"maxScore": 0.13050619,
"docs": [
{
"title": "developer"
}
]
},
"shop": {
"numFound": 1,
"start": 0,
"maxScore": 1.1272022,
"docs": [
{
"title": "shop"
}
]
},
"support": {
"numFound": 84,
"start": 0,
"maxScore": 1.3669837,
"docs": [
{
"title": "support"
}
]
}
}
}
I want to sort based on the below sort array (in same order as below).
[ 'shop', 'support', 'developer']
Is there a way to sort this json based on some custom value?