@tight/object-extract
v0.1.4
Published
Extract nested values from objects
Downloads
4
Readme
object-extract
Extract nested values from objects:
import extract from '@tight/object-extract';
const object = {
foo: 'value of foo',
bar: {
baz: 'value of bar.baz'
}
};
extract(object, 'foo');
// => value of foo
extract(object, 'foo.bar');
// => value of bar.baz