performant-array-to-tree
                                
                                 performant-array-to-tree copied to clipboard
                                
                                    performant-array-to-tree copied to clipboard
                            
                            
                            
                        Converts an array of items with ids and parent ids to a nested tree in a performant O(n) way. Runs in browsers and Node.js.
When there are multiple parents (at the same highest level) with multiple children, the result is [] empty. ``` const data = [ { "Id": "51eba4ed-d724-48f6-9627-16704ef56b7a", "LastModified": "2022-04-20T14:46:58Z", "Title": "Navigation",...
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. Commits 7efb22a 1.2.6 ef88b93 security notice for additional prototype pollution issue c2b9819 isConstructorOrProto adapted from PR bc8ecee test from prototype pollution PR See full...
Is there a way to include a back reference to the parent from each nested child.
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8. Changelog Sourced from minimist's changelog. v1.2.8 - 2023-02-09 Merged [Fix] Fix long option followed by single dash [#17](https://github.com/minimistjs/minimist/issues/17) [Tests] Remove duplicate test [#12](https://github.com/minimistjs/minimist/issues/12) [Fix]...
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. Release notes Sourced from json5's releases. v1.0.2 Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a...
close https://github.com/philipstanislaus/performant-array-to-tree/issues/48
```js const tree = arrayToTree(arr, { transform: ['id', 'key1'], // transform: item => { return { id: item.id, key1: item.key1 } }, }); ```
> [!CAUTION] > This repository is no longer maintained. Unfortunately, I cannot find time anymore to maintain this repository. Feel free to share any potential alternatives to this library in...