I'm not sure whether this is possible or not. Say I got a JSON array similar to the one below
{
"hitsPerPage": 30,
"hitList": {
"Nodes": [
{
"Path": "/content/desktop/gt/en/personal/jcr:content",
"Extension": "html",
"Title": "jcr:content",
"Type": "cq:PageContent",
}, {
"Path": "/content/desktop/gt/en/save-and-invest/jcr:content",
"Extension": "html",
"Title": "jcr:content",
"Type": "cq:PageContent",
}, {
"Path": "/content/desktop/gt/en/investment-accounts/jcr:content",
"Extension": "html",
"Title": "jcr:content",
"Type": "cq:PageContent",
}, {
"Path": "/content/desktop/gt/en/tools-and-guidance/jcr:content",
"Extension": "html",
"Title": "jcr:content",
"Type": "cq:PageContent",
}]
}
}
Is it possible to re-order the order in which the Nodes array of objects are displayed, something like
"Nodes": [
{
"Path": "/content/desktop/gt/en/investment-accounts/jcr:content",
"Extension": "html",
"Title": "jcr:content",
"Type": "cq:PageContent",
}, {
"Path": "/content/desktop/gt/en/save-and-invest/jcr:content",
"Extension": "html",
"Title": "jcr:content",
"Type": "cq:PageContent",
},
"Path": "/content/desktop/gt/en/tools-and-guidance/jcr:content",
"Extension": "html",
"Title": "jcr:content",
"Type": "cq:PageContent",
},{
"Path": "/content/desktop/gt/en/personal/jcr:content",
"Extension": "html",
"Title": "jcr:content",
"Type": "cq:PageContent",
}]
Any sample code in Java if this is possible