0.1.3 • Published 7 years ago
safe-object-navigation v0.1.3
/!\ Please, use 'q_' package instead.
Safe navigation into objects
const q = require('q_');
const object = {
a: {
b: {
c: {
d: 1,
array: ['foo', 'bar'],
},
},
},
};
q(object, 'a.b.c.d'); // => 1
q(object, 'a.b.c.array[1]'); // => bar