Skip to content

A utility function to convert JSON objects to dotnotation

License

Notifications You must be signed in to change notification settings

zishone/dotnotate

Repository files navigation

dotnotate NPM Build codecov License

A utility function to convert JSON objects to dotnotation

Installation

$ npm i @zishone/dotnotate

Usage

1. Import dotnotate

const { dotnotate } = require('@zishone/dotnotate');

2. Dotnotate

const obj = { a: { b: { c: 1 } } };

const dotnotatedObj = dotnotate(obj);

console.log(JSON.stringify(dotnotatedObj, null, 2))
// {
//   'a.b.c': 1
// }

Authors

  • Zishran Garces

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A utility function to convert JSON objects to dotnotation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published