node-dig

1.0.1 • Public • Published

node-dig

This library enables you to access nested elements in Object.

installation

npm install --save node-dig

Usage

const dig = require('node-dig');
 
let object = {};
 
// set value
dig(object, ['a', 'b', 'c'], 10);
 
// { a: { b: { c: 10 } } }
console.log(object);
 
// get value
const value = dig(object, ['a', 'b', 'c']);
 
// 10
console.log(value);

Readme

Keywords

Package Sidebar

Install

npm i node-dig

Weekly Downloads

6

Version

1.0.1

License

Apache-2.0

Last publish

Collaborators

  • ysm001