getx
v1.0.0
Published
Get deep into an object given an array of keys
Downloads
10
Readme
getx
Get deep into an object given an array of keys.
api
getx (object, array[string]) -> any
install
npm install getx --save
usage
var getx = require('getx')
var obj = { x: { y: { z: 1 } } }
var keyPath = ['x', 'y', 'z']
getx(obj, keyPath) // 1