Output specific key value in object for each element in array with jq for JSON
The command-line tool jq writes to STDOUT and/or STDERR. If you want to write the .AssetId information to STDOUT, then one possibility would be as follows: jq -r “.[] | .AssetId” input.json Output: 14462955 114385498 29715011 98253651 A more robust incantation would be: .[] | .AssetId? but your choice will depend on what you want … Read more