Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/kartikesingh/edit-object
- Owner: KartikeSingh
- License: mit
- Created: 2021-11-12T06:04:37.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-28T08:35:41.000Z (about 3 years ago)
- Last Synced: 2023-03-05T23:08:07.491Z (almost 2 years ago)
- Topics: edit, object
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/edit-nested-object
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).