Skip to content

Svjard/lodash-get

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alternative to _.result

An extended version of _.result call _.get which handles variable number of keys and handles nested objects.

Documentation contains some usage examples.

Objects

_.get(object[, keys])

Similiar to _.result.

var obj = {a: {b: {c: {d: 1}}}, e: {f: {g: 2}, c: 3}};
_.get(obj, 'a', 'b', 'c', 'd'); // => 1
_.get(obj, 'a', 'b', 'c', 'foo'); // => undefined (does not error out)

About

Mixin for _.result which does nesting in the object.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published