Reads all fields and sub-fields of node, returning as a basic tree structure. The structure is a snapshot of the object. If the object changes afterwards, the tree will remain the same.

Alternatively, consider asDynamicTraversable which reads the object dynamically.

  • Type Parameters

    • T extends object

    Parameters

    Returns TreeNode<Readonly<{
        ancestors?: string[];
        name: string;
        value: any;
    }>>