recently encountered a data conversion problem, as follows:
for example, metadata is like this:
[{
name: "a",
children: [{
name: "b",
children: [{
name: "c"
},{
name: "d",
}]
}]
}, {
name: "f",
children: [{
name: "g",
children: [{
name: "h"
},{
name: "i",
}]
}]
}]
The level of is uncertain. I know to use recursion, but I want to stuff it in an object. It"s easy to wrap around. I"ve been thinking silly. Do you have any ideas?