@imjano/get_object_in_object
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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'

Package Sidebar

Install

npm i @imjano/get_object_in_object

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

4.57 kB

Total Files

8

Last publish

Collaborators

  • imjano