Skip to content

Flatten keys and values of a JSON file in a greppable format

License

Notifications You must be signed in to change notification settings

jonathanpoelen/flatjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Flatten keys and values of a JSON file in a greppable format.

Usage

Usage: flatjson [-q | -Q] [FILE]...
 -q  string are in single quote
 -Q  string are in double quote

Example

flatjson.py <<<'{"key1": "value1",
"key2": [1,5,7],
"key3": {"a": "x", "b": 4}
}'

output:

.key1 = value1
.key2[0] = 1
.key2[1] = 5
.key2[2] = 7
.key3.a = x
.key3.b = 4

About

Flatten keys and values of a JSON file in a greppable format

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published