扁平化递归查询树中某一个节点及当前节点及以下的所有节点

var arr = [{name: 1, children: [{name: 2, children: [{name: 3, children: []}]}]}]let arrs = dgtest(arr[0]) function dgtest(root) {let arr = [] if (roo
posted @ 2024-05-08 23:18  王卫朋  阅读(4)  评论(0编辑  收藏  举报