YiRan
Results
1
comments of
YiRan
``` function convert(list) { let map = {}; list.forEach(v => { if(map[v.parentId]) { map[v.parentId].push(v); }else { map[v.parentId] = [v]; } }) list.forEach(v => { if(map[v.id]) { v.children = map[v.id]; }...