1.0.0 • Published 6 years ago
@beohoang98/flatify-json v1.0.0
Using
const {flatify} = require('@beohoang98/flatify-json');
// or in ES6
import flatify from '@beohoang98/flatify-json';
flatify({
something: 'here',
root: {
leap: "any",
otherLeap: null,
},
array: [
{
nested: 'array',
},
{
nested_object: {
a: 1,
b: 2,
}
}
],
});
Output:
{
"something": "here",
"root.leap": "any",
"root.otherLeap": null,
"array": [
{"nested": "array"},
{"nested_object.a": 1},
{"nested_object.b": 2},
]
}
1.0.0
6 years ago