Skip to content

mitghi/jetrocli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jetrocli

GitHub

Jetro command-line tool for transforming, querying and comparing JSON format.

installation

On Mac, using Homebrew:

$ brew tap mitghi/jetrocli
$ brew install jetrocli
$ jetrocli
Transform, compare and query JSON format

Usage: jetrocli [OPTIONS] --query <QUERY>

Options:
  -q, --query <QUERY>  Jetro query
  -f, --file <FILE>    JSON filepath ( or pipe to stdin instead )
  -h, --help           Print help
  -V, --version        Print version

Please check the release for other platforms, there are several compiled binaries.

examples

$ echo '{"some":"value", "keys": [1,2,4,8, {"name": "jetro", "isAwesome": true}]}' | jetrocli  --query ">/..keys/#filter('isAwesome' == true)/*/#formats('From {}', 'name') ->* 'message'"
{
  "message": "From jetro"
}