https://github.com/coderaiser/nessy
set value in nested object
https://github.com/coderaiser/nessy
javascript json nested nodejs object value
Last synced: 3 months ago
JSON representation
set value in nested object
- Host: GitHub
- URL: https://github.com/coderaiser/nessy
- Owner: coderaiser
- License: mit
- Created: 2016-03-15T19:03:45.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2025-03-06T16:38:46.000Z (10 months ago)
- Last Synced: 2025-10-04T00:21:44.217Z (3 months ago)
- Topics: javascript, json, nested, nodejs, object, value
- Language: JavaScript
- Size: 52.7 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
# Nessy [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
[NPMIMGURL]: https://img.shields.io/npm/v/nessy.svg?style=flat
[BuildStatusURL]: https://github.com/coderaiser/nessy/actions?query=workflow%3A%22Node+CI%22 "Build Status"
[BuildStatusIMGURL]: https://github.com/coderaiser/nessy/workflows/Node%20CI/badge.svg
[NPMURL]: https://npmjs.org/package/nessy "npm"
[CoverageURL]: https://coveralls.io/github/coderaiser/nessy?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/nessy/badge.svg?branch=master&service=github
Set value in nested object.
## Install
`npm i nessy --save`
## Hot to use?
```js
const nessy = require('nessy');
nessy('hello.world', 'why not?', '.', {
hello: {
world: 'could be used in browser as well',
},
});
// returns
({
hello: {
world: 'why not?',
},
});
nessy('hello*world', 'why not?', '*', {
hello: {
world: 'can be used any divider',
},
});
// returns
({
hello: {
world: 'why not?',
},
});
// even arrays supported
nessy('hello.0', 'world', {});
// returns
({
hello: ['world'],
});
```
## Related
- [jessy](https://github.com/coderaiser/jessy "jessy") - get value by object property.
- [all-object-keys](https://github.com/coderaiser/all-object-keys "all-object-keys") - get all keys of object.
- [finicky](https://github.com/coderaiser/finicky "finicky") delete property of an object
## License
MIT