$ echo '[ "Hello world", 42, null, "foo, bar baz" ]' | jq .[] "Hello world" 42 null "foo, bar baz"
17
: echo '[ {"id": 42, "txt": "Hello world"}, {"id": 99, "txt": "ninety-nine"}, {"id": 17, "txt": "Find me" }, {"id": 1, "txt": "The first" } ]' | jq ' .[] | select ( .txt == "Find me" ) | .id '