1.0.1 • Published 2 years ago

@imjano/get_object_in_object v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years 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

2 years ago

1.0.0

2 years ago