I had to dig through the source code for this syntax that does exactly what I want, it should really be documented in the README.
Example usage:
# Parse out all the text of the Git glossary terms
curl -s https://git-scm.com/docs/gitglossary \
| hq '{ headings: dt.hdlist1 | [{ text: @text }] }' \
| jq --raw-output '.headings[].text'
I had to dig through the source code for this syntax that does exactly what I want, it should really be documented in the README.
Example usage: