Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Parsing JSON at the CLI: A Practical Introduction to jq and more.
Babashka[1] with Cheshire[2] aliased as json solves this to me, the code is longer but no need for googling anymore:
USERX='{"name":"duchess","city":"Toronto","orders":[{"id":"x","qty":10},{"id":"y","qty":15}]}' echo $USERX | jq '.orders[]|select(.qty>10)' { "id": "y", "qty": 15 } echo $USERX | bb -i -o '(-> *input* first (json/decode true) (->> :orders (filter #(> (:qty %) 10))))' {:id y, :qty 15}
There are no comments on this comment yet.
Babashka[1] with Cheshire[2] aliased as json solves this to me, the code is longer but no need for googling anymore:
[1]: https://github.com/borkdude/babashka [2]: https://github.com/dakrone/cheshire