Skip to content

A simple script who returns a JS object from a dotnotation string

License

Notifications You must be signed in to change notification settings

NonameMedia/undotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

undotify

Gets the value of an object, by a dotnotated path

Example

var json = {
  "drinks": {
    "alcoholic": {
      "beer": "Augustiner",
      "cider": "Bulmers"
    },
    "nonalc": {
      "coffee": "Cappuccino",
      "juice": "Orangejuice"
    }
  }
};

var iWouldLikeToDrink = undotify('drinks.nonalc.coffee', json);
// Cappuccino

About

A simple script who returns a JS object from a dotnotation string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published