Tree
/ API ReferenceTree
/ API Referenceget
Gets a node by its id.
The Gist
import { get } from '@weser/tree'
const node = get(tree, 'node-id')
Parameters
| Parameter | Type | Description |
|---|---|---|
| rootNode | T | The root node of the tree. |
| id | string | The id of the node to get. |
Returns
(T | null) The node with the given id or null if no node with the given id was found.
© 2024-present Robin Weser. All Rights Reserved.