1.0.1 • Published 1 year ago
@imjano/get_object_in_object v1.0.1
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'