This library flattens JSON files.
Before:
{
"key1": {
"keyA": "valueI"
},
"key2": {
"keyB": "valueII"
},
"key3": { "a": { "b": { "c": 2 } } }
}
After:
{
"key1.keyA": "valueI",
"key2.keyB": "valueII",
"key3.a.b.c": 2
}
The library can do the reverse operation as well: unflatten.
The documentation page lists how you can add this library as a dependency of your project.
Based on the work of Jeffrey Blattman. Created to be compatible with NPM flat.