js数组中将有父子关系的平行数组转换成树形数据

let data = [ {id: 1, text: '清北', parentId: 0}, {id: 2, text: '浙京', parentId: 2}, {id: 3, text: '浙京&#

数组树形数组