jq
Section: (pj)
Updated: 2021-10-19
Index
Return to Main Contents
Count the items in an array:
-
jq '.|length' foo.json
Get an attribute (e.g. name) for each object in an array:
-
jq -r .[].name foo.json
(The -r is to get the strings without quotes.)
For each object in an array, print two attributes:
-
jq -r '.[] | [.itemid, .warehouse] | @tsv' < items.json
AUTHORS
Paul A. Jungwirth.
Index
- AUTHORS
-
This document was created by
man2html,
using the manual pages.
Time: 21:16:02 GMT, January 04, 2026