File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,14 @@ In a browser:
5252```
5353## API
5454### ` smartArrayToTree(data, [options]) `
55- Convert a plain array of nodes (with pointers to parent nodes) to a a nested data structure.
5655
5756#### Parameters
5857- ** Array** ` data ` : An array of data
5958- ** Object** ` options ` : An object containing the following fields:
6059 - ` id ` (String): An unique node identifier. Default: 'id'
6160 - ` pid ` (String): A name of a property where a link to a parent node could be found. Default: 'pid'
6261 - ` 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
6463
6564#### Return
6665- ** Array** : Result of transformation
You can’t perform that action at this time.
0 commit comments