1.0.1 • Published 1 year ago

@imjano/get_object_in_object v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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'
1.0.1

1 year ago

1.0.0

1 year ago