先做两道题 题目1:实现一个对树型结构进行过滤的函数,其中树形结构的格式如下: tree = [ {name: 'A'}, {name: 'B', children: [ {name: 'A'}, {name: 'AA', children: [...]} ]}, {name: 'C'} ] 1. 假设我输入的 str 为 A 则过滤后返回的结果为 [ {name: 'A',children: [name: 'bcde']}, {name: 'B', children: [ {name:...