Get optional value from deep nested object, array
npm install optional-valueoptional-value finds out a value from nested object or array.
``bash`yarn
$ yarn add optional-valuenpm
$ npm install optional-value
`js
import o from 'optional-value'
const someObject = {
foo: {
bar: 'hoge'
}
}
const value = o(someObject, 'foo.bar')
// => hoge
const noneValue = o(someObject, 'foo.boo')
// => null
const obj = o(someObject, 'foo')
// => {bar: 'hoge'}
``