• Removes a specific key (dot notation) from an object or array.

    Parameters

    • target: unknown

      The object or array to remove the key from.

    • key: string | number | string[]

      The key in dot notation or path of the element to remove.

    Returns unknown

    The modified object or array.

    Example

    const object = {users: {name: ['Taylor', 'Otwell']}};
    dataForget(object, 'users.name.0') // {users: {name: ['Otwell']}}

Generated using TypeDoc