jq: Select entry from list of objects for which key equals value
This example selects, given a list of JSON entries, all entries where .service
equals "mongodb"
(i.e. {"service": "mongo"}
:
jq 'map(select(.service=="mongo"))'
This example selects, given a list of JSON entries, all entries where .service
equals "mongodb"
(i.e. {"service": "mongo"}
:
jq 'map(select(.service=="mongo"))'