Updated README.

This commit is contained in:
Vegard Berg 2023-11-30 12:05:16 +01:00
parent 7744206872
commit df9e4fc6c2
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,13 @@
Very simple tool to search by string or number value and get the JSON key from it. Very simple tool to search by string or number value and get the JSON key from it.
## Usage ## Usage
`jsonsearch [-all] [-type=(string|number)] <match> [<file>|-]`
- `-all` will search for all occurrences
- `-type` will set the type to search for; defaults to string
- `<match>` is the value to match against
- `<file>|-` is either a relative file path or a dash, indicating to read from STDIN.
```sh ```sh
# Search for the first occurrence of 'foo Bar'. # Search for the first occurrence of 'foo Bar'.
jsonsearch "foo Bar" myfile.json jsonsearch "foo Bar" myfile.json