read-nested-object
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Installations

npm i read-nested-object

What ?

With this module you can read nested object with keys like "name.first", "hobby.real.0" etc

How ?

const readObject = require('read-nested-object');

// import readObject from "./" // for typescript

const ob = {
    name: {
        first: "Shisui",
        last: "Uchiha",
    },
    hobby: {
        real: ["sleeping", "wasting time"],
        fake: ["coding", "gaming"]
    }
}

console.log(readObject(ob,"name.first")); // output => Shisui
console.log(readObject(ob,"hobby.real.0")); // output => sleeping

Supports

For support or issues or queries contace me on my discord server, If you find any bug create a issue here.

Readme

Keywords

none

Package Sidebar

Install

npm i read-nested-object

Weekly Downloads

28

Version

1.0.1

License

MIT

Unpacked Size

3.92 kB

Total Files

6

Last publish

Collaborators

  • shisui