• Dynamically get a nested value from an array or object with a string.

    Type Parameters

    • TDefault = unknown

    Parameters

    • value: any
    • path: string
    • Optional defaultValue: TDefault

    Returns TDefault

    Example

    get(person, 'friends[0].name')