README
Getvalue
Get a nested value from an object by path.
Installation
npm install getvalue --save
Usage
Arguments
object
(Object) The object to querypath
(Array) The path of the property to get- (Optional)
defaultValue
(any) The value returned forundefined
resolved values
Example
import { get } from 'getvalue'
const obj = { a: { b: { c: 10 } } }
get(obj, ['a', 'b', 'c']) //=> 10
get(obj, ['not', 'here']) //=> undefined
get(obj, ['or', 'here'], 1) //=> 1
License
Apache 2.0