Converts a JSON Document with nested objects and their parameters to the JSON Document with Flat Denormalised Data.
Project description
jsonflattifier
Converts a JSON Document with nested objects and their parameters to the JSON Document with Flat Denormalised Data.
Input
{
"name": "John",
"has": [
"apple",
"peach"
]
}
Get flat JSON
> jsonflattifier flattify "{...}" --json --jsonpath-keys --no-table
[
{
"$['name']": "John",
"$['has'][0]": "apple"
},
{
"$['name']": "John",
"$['has'][1]": "peach"
}
]
Get CSV
> jsonflattifier flattify "{...}" --csv --no-table
['name'],['has']
John,apple
John,peach
Print Table
> jsonflattifier flattify "{...}"
['name'] | ['has'] |
---|---|
John | apple |
John | peach |
2 rows in set
More Examples
https://gitlab.com/v.grigoryevskiy/json-flattifier/-/tree/master/tests/data
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jsonflattifier-1.1.2.tar.gz
(5.3 kB
view hashes)