So, I've encountered a bit of a pickle with the data from an endpoint that I need to format for a menu project I'm working on. It's all jumbled up and not making much sense right now. Any assistance would be greatly appreciated!
This is the original data:
{
SubMenu: {
Main: [
{
Main: "Database",
SubMenu: {
Name: "Manage",
Path: "databaseManage",
icon: "mdi-database",
innerMenu: "false",
},
},
...
],
},
},
Here is how it should look:
[
{
main: "Databases",
submenu: [
{
name: "Manage",
path: "databaseManage",
icon: "mdi-database",
innerMenu: false,
},
...
],
},
...
],
I've tried using computed properties, as well as Object.keys and values, but haven't been able to reach a solution yet. Can anyone provide some guidance?