js tree structure to flat, flat to tree · In react: · flag=(arr)=> { · let result = [] · let item · for (item of arr) { · var res = JSON.parse(JSON.stringify(item)) ...
確定! 回上一頁