Module

x/lodash_es/src/object.js>unset

lodash for deno use
Latest
function unset
import { unset } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/object.js";

Removes the property at path of object.

Note: This method mutates object.

Examples

var object = { 'a': [{ 'b': { 'c': 7 } }] }; _.unset(object, 'a[0].b.c'); // => true

console.log(object); // => { 'a': [{ 'b': {} }] };

_.unset(object, ['a', '0', 'b', 'c']); // => true

console.log(object); // => { 'a': [{ 'b': {} }] };

Parameters

object

The object to modify.

path

The path of the property to unset.