Command line editor for json.
Command line editor for json.
Usage
je [command]
Available Commands:
completion Generate auto completions script for goe for the specified shell (bash)
delete Delete the keys of json
help Help about any command
update update a json file
version print current version information
Flags:
-h, --help help for je
Use "je [command] --help" for more information about a command.
The below is content of source.json
.
{
"name": "je",
"version": "v1.0",
"detail": {
"n": "je",
"v": "v1.0"
},
"users": [
"a",
"b"
]
}
- modify
name
valueje
tojee
$ je update --set name=jee source.json
- modify
detail.n
valueje
tojee
$ je update --set detail.n=jee source.json
- modify
users
valuesa
toaa
$ je update --set users[0]=aa source.json
- modify
name
valueje
tojee
and modifyn
valueje
tojee
$ je update --set name=jee,detail.n=jee source.json
- delete key
name
$ je delete --keys name source.json
- delete key
detail.n
$ je delete --keys detail.n source.json