how to render the structure like the figure and assign amount; (the content and length of the array are not fixed at least one)
list: [
{
name:"",
child:[
{
id:1,
name:"",
child:[
{
id:999,
name:"",
amount:1250
},
{
id:1000,
name:"",
amount:500
}
]
}
]
},
{
name:"",
child:[
{
id:2,
name:"",
child:[
{
id:1001,
name:"",
amount:1250
}
]
}
]
}
]