Dynamically find nested properties on an object
npm install addressable-node

Small library for accessing nested properties of a Javascript object.
Install via Bower or NPM.
```
npm install addressable-node
bower install addressable
`js
var obj = {
id: 1,
name: 'Bob',
age: 31,
country: {
id: 1,
name: 'USA'
},
tags: [
{ color: { name: 'blue' } },
{ color: { name: 'yellow' } }
]
}
var Addressable = require('addressable-node');
Addressable.find(obj, 'country.name') => 'USA'
new Addressable(obj).find('country.name') => 'USA'
Addressable.find(obj, 'tags[].color.name') => [ 'blue', 'yellow' ]
`
See tests for full example
`js
angular.module('myApp', ['addressable']);
angular.module('myApp').factory('Person', ['Addressable', function (Addressable) {
var Person = function () {
this.country = {
name: 'United States',
shortName: 'USA'
}
};
Person.prototype.countryName = function () {
return Addressable.find(this, 'country.name');
};
return Person;
}]);
`
To build the browserify module version of the gem use the npm build script.
``
npm run build
This builds a new version in the dist directory.
1. Fork it
2. Create your feature branch (git checkout -b my-new-feature)git commit -am 'Add some feature'
3. Commit your changes ()git push origin my-new-feature`)
4. Push to the branch (
5. Create new Pull Request
* 0.2.0 Add Angular module
* 0.1.1 Add Bower Package
* 0.1.0 Initial release