Module

x/lodash_es/src/object.js>get

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

Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place.

Examples

var object = { 'a': [{ 'b': { 'c': 3 } }] };

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

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

_.get(object, 'a.b.c', 'default'); // => 'default'

Parameters

object

The object to query.

path

The path of the property to get.

defaultValue