Go to file
Vegard Berg 7744206872 Initial commit 2023-11-30 12:01:20 +01:00
README.md Initial commit 2023-11-30 12:01:20 +01:00
go.mod Initial commit 2023-11-30 12:01:20 +01:00
go.sum Initial commit 2023-11-30 12:01:20 +01:00
main.go Initial commit 2023-11-30 12:01:20 +01:00

README.md

jsonsearch

Very simple tool to search by string or number value and get the JSON key from it.

Usage

# Search for the first occurrence of 'foo Bar'.
jsonsearch "foo Bar" myfile.json

# Search for all occurrences of 'foo Bar'.
jsonsearch -all "foo Bar" myfile.json

# Search using STDIN
cat myfile.json | jsonsearch "foo Bar"
# or
cat myfile.json | jsonsearch "foo Bar" -

# Search a number
jsonsearch -type=number 3.141518 myfile.json