Use jq’s Inbuilt Pipe `|` Operator

Show QR code Hide QR code
QR code linking to https://navendu.me/tils/18-11-24-use-jqs-inbuilt-pipe-operator/

When combining multiple jq filters, you can use jq’s inbuilt pipe | operator instead of shell pipes.

i.e., instead of this:

curl 'https://jsonplaceholder.typicode.com/users' | jq \
'.[]' | jq 'select(.address.city == "South Christy")' | jq '{name, username, email}'

You can do this:

curl 'https://jsonplaceholder.typicode.com/users' | jq \
'.[] | select(.address.city == "South Christy") | {name, username, email}'

Webmentions • Last updated at 7:23 PM, 4th December 2026

Have you written a response to this? Send me a webmention by entering the URL.

Keyboard shortcuts

j kNext or previous item in a list; scroll elsewhere
g gGo to the top
GGo to the bottom
n pNext or previous page
/Search, where there is a search box
tSwitch between light and dark
g hGo home
g pGo to posts
g bGo to books
g aGo to archives
← →Previous or next image, in the image viewer (z zooms, Esc closes)
?Show this list, even when disabled