Today I learned ( well, actually it was yesterday but who's counting days ? ) about fzf in the context of using it to test JQ expressions.
The revelation came from Julia Evans, author of WizardZines, aka b0rk, about whom I've written before.
She'd mentioned the use of fzf and jq in a post on Mastodon: -
so I had to try it out ...
Install fzf
brew install fzf
Create a JSON document
[
{
"givenName": "Maggie",
"familyName": "Simpson"
},
{
"givenName": "Lisa",
"familyName": "Simpson"
},
{
"givenName": "Marge",
"familyName": "Simpson"
},
{
"givenName": "Homer",
"familyName": "Simpson"
},
{
"givenName": "Bart",
"familyName": "Simpson"
}
]
EOF
Fire up fzf
echo '' | fzf --preview 'jq {q} < the_simpsons.json'
Tinker with various jq queries
No comments:
Post a Comment