Getting panel JSON data of an Influxdb datasource panel using query in javascript for a html-plugin panel

I have created one html panel where I want to modify style of a node based on the data of another panel which is of Influxdb data source.

Here in this javascript code I want to load the dynamic JSON panel data of the below Influxdb data source panel.

Is there any way to load this JSON panel data using a query in the javascript code. Below is the query used for the Influxdb data source panel-
from(bucket: “API_Response”)
|> range(start: 2022-01-17T12:23:13Z, stop: 2022-01-17T18:23:13Z)
|> filter(fn: (r) => r["_measurement"] == “Validation”)
|> filter(fn: (r) => r[“API”] == “API1”)
|> filter(fn: (r) => r["_field"] == “Functional_Validation_passed”)