怎么用递归封装下面的数据格式 { text: "Parent 1", nodes: [ { text: "Child 1", nodes: [ { text: "Grandchild 1" }, { text: "Grandchild 2" } ] }, { text: "Child 2", nodes: [ { text: "Grandchild 1" }, { text: "Grandchild 2" } ] } ] }, { text: "Parent 2" }, { text: "Parent 3" }, { text: "Parent 4" }, { text: "Parent 5" }];
添加回答
举报
0/150
提交
取消