Thanks again @mroknich . This is the output from the snippet provided, though it's not changed the data order, as I am sorting it in the query.
And attached is the menu as it is shown on the screen now, with this data.
[
{
"id": 1,
"collection_id": "275056033886",
"title": "Handles",
"parent_title": "Fusion",
"sort_order": "1"
},
{
"id": 2,
"collection_id": "275000328286",
"title": "Ends",
"parent_title": "Fusion",
"sort_order": "2"
},
{
"id": 3,
"collection_id": "405752978",
"title": "Hubs & Spokes",
"parent_title": "Fusion",
"sort_order": "3"
},
{
"id": 10,
"collection_id": "161592606814",
"title": "Juggling Balls Individual",
"parent_title": "Juggling",
"sort_order": "1"
},
{
"id": 9,
"collection_id": "161592541278",
"title": "Juggling Ball Sets",
"parent_title": "Juggling",
"sort_order": "2"
},
{
"id": 11,
"collection_id": "161592672350",
"title": "Juggling Clubs",
"parent_title": "Juggling",
"sort_order": "3"
},
{
"id": 12,
"collection_id": "260604362846",
"title": "Contact Juggling",
"parent_title": "Juggling",
"sort_order": "4"
},
{
"id": 4,
"collection_id": "360906834",
"title": "Lumi Led",
"parent_title": "Lumi Led",
"sort_order": "4"
},
{
"id": 6,
"collection_id": "262209208414",
"title": "Djembe Drums",
"parent_title": "Music",
"sort_order": "10"
},
{
"id": 7,
"collection_id": "137207382110",
"title": "Top Sellers",
"parent_title": null,
"sort_order": "0"
},
{
"id": 5,
"collection_id": null,
"title": "Music",
"parent_title": null,
"sort_order": "10"
},
{
"id": 13,
"collection_id": null,
"title": "Juggling",
"parent_title": null,
"sort_order": "11"
},
{
"id": 8,
"collection_id": "159756025950",
"title": "Hula Hoops",
"parent_title": null,
"sort_order": "12"
}
]