• Traverses an object along a path to the parent object of the path.

    Throws

    OPDUtilsObjectTraversalError if the path is empty

    Returns

    the parent as well as the parsed path to reach the parent and the child as well as the key for the child

    Parameters

    • path: string

      The path to traverse the object along. This can be a path like foo.bar, a path to a specific index in an array e.g. foo[0] or any combination of those e.g. foo['bar'].baz[0]. Like the javascript notation, except that the ? operator is not supported.

    • o: any

      the object to traverse

    Returns {
        child: KeyValuePair<string, any>;
        parent: KeyValuePair<string[], any>;
    }

Generated using TypeDoc