Skip to content

wooos/je

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

je

CircleCI

Command line editor for json.

Usage

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.

Example

The below is content of source.json.

{
  "name": "je",
  "version": "v1.0",
  "detail": {
    "n": "je",
    "v": "v1.0"
  },
  "users": [
    "a",
    "b"
  ]
}
  1. modify name value je to jee
$ je update --set name=jee source.json
  1. modify detail.n value je to jee
$ je update --set detail.n=jee source.json
  1. modify users values a to aa
$ je update --set users[0]=aa source.json
  1. modify name value je to jee and modify n value je to jee
$ je update --set name=jee,detail.n=jee source.json
  1. delete key name
$ je delete --keys name source.json
  1. delete key detail.n
$ je delete --keys detail.n source.json