prop

Functional property method

prop

Functional method to get a property from an object.

var obj = {foo: 'bar'}
var result = prop('foo')(obj)
 
// Also with nested properties 
var nested = { foo: { bar: "baz" }}
var result = prop("foo.bar")(nested)
npm install prop

pull requests welcome

MIT