Skip to content
/ keyson Public

Access nested json objects using simple string based paths.

License

Notifications You must be signed in to change notification settings

b37t1td/keyson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keyson

npm Travis Coveralls David

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

About

Access nested json objects using simple string based paths.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published