1.0.0 • Published 6 years ago
object-dots v1.0.0
object-dots
Find and manipulate deeply nested object
Install
$ npm install object-dots
Usage
const prototype = {
foo: {
bar: 'bar',
qux: {
quux: 'quux',
corge: {
xyzzy: 'xyzzy',
thud: 'thud'
}
}
},
baz : 'baz'
}
const dots = require('object-dots')
dots.path(prototype, 'thud') // -> foo.qux.corge.thud
dots.update(prototype, '.foo.qux.corge.thud', 'new thud')
1.0.0
6 years ago