Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.05 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.05 KB

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"
}