keyson
v1.0.2
Published
Access nested json objects using simple string based paths.
Downloads
5
Readme
keyson
Access nested json objects using simple string based paths.
Installation
npm install keyson
Usage
keyson(object, key [,separator]
var obj = {
name : 'test',
test : [
'hello',
'world',
{ nested : [1, 2, 3] }
]
};
keyson(obj, 'name'); // test
keyson(obj, 'test.0'); //hello
keyson(obj, 'test.2.nested.2'); // 3
License
MIT (c) Svetlana Linuxenko