Skip to content
Get and set object properties with dot notation
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitignore
Readme.md
component.json
index.js
package.json

Readme.md

dot

Get and set object properties with dot notation

Installation

$ component install eivindfjeldstad/dot

API

dot.set(object, path, value)

dot.set(obj, 'cool.aid', 'rocks');
assert(obj.cool.aid === 'rocks');

dot.get(object, path)

var value = dot.get(obj, 'cool.aid');
assert(value === 'rocks');

License

MIT

Something went wrong with that request. Please try again.