@npmcorp/etcd-result-objectify
v1.0.0
Published
Objectify the results of a recursive etcd query
Downloads
1,467
Readme
etcd-result-objectify
Objectify the results of a recursive etcd query.
For example, a structure like:
- foo
- bar: baz
- oof
- baz: rab
changes into:
{
foo: {
bar: "baz",
oof: {
baz: "rab"
}
}
}
Installation
npm install etcd-result-objectify
Usage
var Etcd = require('node-etcd')
var etcdResultObjectify = require('etcd-result-objectify')
var etcd = new Etcd()
etcd.get('foo', { recursive: true }, function(err, result) {
if (err) throw err
console.dir(etcdResultObjectify(result))
})