Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'
Example: To get json record having _id equal 611
cat my.json | jq -c '.[] | select( ._id | contains(611))'
Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)
@samrjack Another way to do the same without changing the order on the command line is to replace:
cat file | jq ...
with:
< file jq ...
You can put the
< file
anywhere on the command line, not just at the end