I have a JSON structure that I need to transform into a menu with sub-menus based on the value of the sub-menu_location
field. Here's an example:
{
"data": [
{
"menu_name": "Primary Operations",
"enabled": true,
"sub-menu_location": null
},
{
"menu_name": "Curated Games",
"enabled": false,
"sub-menu_location": null
},
{
"menu_name": "Cricket",
"enabled": false,
"sub-menu_location": "outdoor"
},
{
"menu_name": "football",
"enabled": false,
"sub-menu_location": "outdoor"
},
{
"menu_name": "Hockey",
"enabled": false,
"sub-menu_location": "outdoor"
}
]
}