@imjano/get_object_in_object
v1.0.1
Published
Through a dot-separated path (example: 'subObject.foo.bar') you can find an object inside another parent object.
Downloads
9
Maintainers
Readme
Get object in object
Given a path divided by dots (example: 'foo.bar') you can find an object inside another parent object
Installation
npm install @imjano/get_object_in_object
Usage
const path = 'foo.bar'
const obj = { foo: { bar: 'hello' } }
console.log(getObjectInObject(obj, path)) //output: 'hello'