object-path-value
v2.0.0
Published
[](https://travis-ci.org/max107/object-path-value)
Readme
Install
npm install object-path-value
yarn add object-path-valueUsage
let getValue = require('object-path-value');
console.log(getValue([1, 2, 3], 1) === 2);
console.log(getValue({ foo: { bar: 'hello world' } }, 'foo.bar') === 'hello world');
console.log(getValue({ foo: { bar: [1, 2, 3] } }, 'foo.bar.0') === 1);