We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 626bc50 commit 29cd16fCopy full SHA for 29cd16f
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "array-to-tree",
3
- "version": "0.5.0",
+ "version": "0.5.1",
4
"description": "Convert a plain array of nodes (with pointers to parent nodes) to a tree",
5
"main": "index.js",
6
"scripts": {
readme.md
@@ -10,7 +10,7 @@ Solves a problem with conversion of retrieved from a database sets of data to a
10
$ npm install --save array-to-tree
11
```
12
13
-## Usage
+## Basic Usage
14
15
```js
16
var arrayToTree = require('array-to-tree');
@@ -33,7 +33,7 @@ var navigation = [{
33
parent_id: null
34
}];
35
36
-var navigationTree = arrayToTree(navigation);
+var navigationTree = arrayToTree({ data: navigation });
37
38
/*
39
* Output:
0 commit comments