Function getValueAtPath

  • Returns the value at the specified path in the object.

    Type Parameters

    • T extends object

    Parameters

    • path: string
    • obj: T
    • separator: string = '.'

    Returns T

    Example

    // returns 1
    valueAtPath('foo.bar', { foo: { bar: 1 } });