I am looking for a way to utilize the v-treeview component from Vuetify in order to construct a hierarchical list of items. This list could potentially have multiple layers, ranging from 10 to 100 levels deep, each containing around 100 items. How can I transform hundreds of individual objects into one comprehensive object with nested children?
Initial Data (2 or more objects):
[
{
id:1 ,
name: "hot-dog",
children: [
{name:"meat"}
]
},
{
id:2 ,
name: "meat",
children: [
{name:"salt"},
{name:"horse-meat"}
]
}
]
Target Data Structure (single master object):
[
{
id:1 ,
name: "hot-dog",
children: [
{
id:2 ,
name: "meat",
children: [
{name:"salt"},
{name:"horse-meat"}
]
}
]
}
]