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
-e, --show-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
Release history Release notifications | RSS feed
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.2.0.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for json_grep-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8f0b84e5e7ac4b733fe9d133abf0d28b086fc566f0e879ca134930fa47a994d |
|
MD5 | 1386ce8088b1a7b3b2a8547657a7d47a |
|
BLAKE2b-256 | 4693d375fe0d409162f457741ed9757e3c77dc3ad2b0204cb3c5fb01c61e4d29 |