Skip to content

getAtPath

getAtPath(root, path): unknown

Defined in: packages/core/src/object/get-at-path.ts:23

Gets the value at path inside root.

Unlike setAtPath, this does not refuse a path through __proto__, constructor or prototype: reading one hands back a prototype the caller could already reach through any object it holds, so refusing it would cost an honest lookup and prevent nothing.

unknown

The root object/array to traverse

PropertyPath

The path to traverse

unknown

The value at the path, or undefined if the path does not exist.