#!/usr/bin/env bash xq -r '[ .NessusClientData_v2.Report.ReportHost | if (. | type == "array") then .[] else . end | (.ReportItem[] + {ip:."@name"})] | .[] | select(."@pluginName" == "'"$1"'") | .ip'