jq JSONPath and

curl --location --request POST 'http://127.0.0.1/api_jsonrpc.php' \
--header 'Content-Type: application/json' \
-d '{
    "jsonrpc": "2.0",
    "method": "host.get",
    "params": {
        "output":["parentTemplates","hostid"],
        "templateids":[10333,10081],
        "selectParentTemplates":"query"
        },
    "id": 1,
    "auth": "aa6eda8b32b96866688ce9fb8c887dba"
}
' | jq '.result[] | select (.parentTemplates[].templateid == "10333" and .parentTemplates[].templateid == "10386") | .hostid '

No comments: