Hacker News new | ask | show | jobs
by rpigab 821 days ago
I love jq and yq, but sometimes I don't want to invest time in learning new syntax and just fallback to some python one liner, that can if necessary become a small python script.

Something like this, I have a version of this in a shell alias:

  python3 -c "import json,sys;d=json.load(sys.stdin);print(doStuff(d['path']['etc']))"
Pretty print is done with json.dumps.