File tree 1 file changed +1
-2
lines changed
1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,14 @@ In a browser:
52
52
```
53
53
## API
54
54
### ` smartArrayToTree(data, [options]) `
55
- Convert a plain array of nodes (with pointers to parent nodes) to a a nested data structure.
56
55
57
56
#### Parameters
58
57
- ** Array** ` data ` : An array of data
59
58
- ** Object** ` options ` : An object containing the following fields:
60
59
- ` id ` (String): An unique node identifier. Default: 'id'
61
60
- ` pid ` (String): A name of a property where a link to a parent node could be found. Default: 'pid'
62
61
- ` children ` (String): The child node name that you want. Default: 'children'
63
- - ` firstPid ` (String): The parent id of fisrt level node . Default: null
62
+ - ` firstPid ` (String): The parent id of top level node . Default: null
64
63
65
64
#### Return
66
65
- ** Array** : Result of transformation
You can’t perform that action at this time.
0 commit comments