Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kartikesingh/edit-object

Edit nested object with indexes like "name.first" etc.
https://github.com/kartikesingh/edit-object

edit object

Last synced: 24 days ago
JSON representation

Edit nested object with indexes like "name.first" etc.

Awesome Lists containing this project

README

        

# Installations
```
npm i edit-nested-object
```

# What ?
With this module you can edit nested object with keys like "name.first" etc

# How ?
```js
const editObject = require('edit-nested-object');

// import editObject from "./" // for typescript

const ob = {
name: {
first: "Shisui",
last: "Uchiha",
}
}

console.log(editObject(ob,"name.first","Itachi")); // output => { name: { first: 'Itachi', last: 'Uchiha' } }
```

# Supports
For support or issues or queries contace me on my [discord server](https://discord.gg/XYnMTQNTFh), If you find any bug create a issue [here](https://github.com/KartikeSingh/edit-object/issues).