A utility function to convert JSON objects to dotnotation
$ npm i @zishone/dotnotate
const { dotnotate } = require('@zishone/dotnotate');
const obj = { a: { b: { c: 1 } } };
const dotnotatedObj = dotnotate(obj);
console.log(JSON.stringify(dotnotatedObj, null, 2))
// {
// 'a.b.c': 1
// }
- Zishran Garces
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.