Skip to main content

Filtering JSON dict keys from STDOUT

Project description

json-grep

Description

Simple tool for filtering JSON dict keys from STDOUT

Usage

json-grep --help
usage: json-grep [-h] [-m] [-v] [-i] filter_keys [filter_keys ...]

JSON GREP is utility for filtering selected keys from json string piped from STDOUT

positional arguments:
  filter_keys           List of keys which you want to filter from json dict. You can also specify value of item which you want to pass only by operator = or ~. '~' means that value is in item on any string position. If key is in deeper level of tree structure
                        use '.' separator to specify how deep is key in dict tree structure.

optional arguments:
  -h, --help            show this help message and exit
  -m, --multiline-output
                        Use multiline output for filtered result
  -v, --values_only     Show only values without keys description
  -i, --ignore-errors   Ignore errors caused by json decode

Installation

wget https://gitlab.com/alda78/json-grep/-/archive/master/json-grep-master.tar && \
tar -xf json-grep-master.tar && \
cd json-grep-master/ && \
sudo python3 setup.py install && \
cd ../ &&  \
sudo rm -rf json-grep-master

or simply

pip3 install json-grep

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

json-grep-1.1.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

json_grep-1.1.1-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page