WTFox / jsonfind

A fast and lightweight utility to easily find paths to values in JSON files.
https://afox.dev/posts/jsonfind
MIT License
31 stars 0 forks source link

wildcard support? #1

Closed evakhoni closed 2 years ago

evakhoni commented 2 years ago

Hey @WTFox! nice tool! wildcard support however will make it even better :) something like:

jsonfind "version*" <(my_command_with_json_output)                                                            
version31:  .items[1].ver
version22:  .items[2].ver

maybe even regex...

also pipe support will be nice..

WTFox commented 2 years ago

@evakhoni Those are great suggestions! Your ideas, plus the new features in 1.18, gives me a reason to dig into this project again. I don't have a timeline for you, but I'll start working on it soon and post updates in this issue.

WTFox commented 2 years ago

@evakhoni Just released version 1.1.0. You can use the -r option to enable regex pattern matching. Piping via stdin is now supported, as well!

❯ echo '[{"eyeColor": "brown"}]' | jf -r 'br*'
.[0].eyeColor

You can update by downloading the release manually or running brew install jsonfind. Hope this helps!