html-query
html-query copied to clipboard
More examples
It would be helpful to have more examples.
I have been trying to get the following to work:
curl -s https://news.ycombinator.com/ | hq '{posts: .athing | [{url: .titleline > a | @(href), title: .titleline > a, comments: .age > a | @(href) }]}' | jq '.'
But lacking examples I haven't been able to get it to work yet.