2.0.0 • Published 4 years ago
object-path-value v2.0.0
Install
npm install object-path-value
yarn add object-path-value
Usage
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);