romayn
Results
2
comments of
romayn
![image](https://user-images.githubusercontent.com/25046000/64084711-8bf2a400-cd60-11e9-9bdc-a265ff520395.png)
arrayToTree([...new Set(array.map(JSON.stringify))].map(JSON.parse)) function arrayToTree(data, nodesField, idField, parentIdField) { if (!nodesField) nodesField = 'children'; idField = idField || '_id'; parentIdField = parentIdField || '_pid'; var nodes = []; var idHash =...