# Access multiple variables from a single Infinity API call

**URL:** <https://community.grafana.com/t/access-multiple-variables-from-a-single-infinity-api-call/146964>\
**Category:** Dashboards\
**Tags:** infinity-datasource\
**Created:** [March 23, 2025, 10:18pm UTC](https://community.grafana.com/t/access-multiple-variables-from-a-single-infinity-api-call/146964 "2025-03-23T22:18:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gmm](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@Gmm](https://community.grafana.com/u/Gmm)\
**Post date:** [March 23, 2025, 10:18pm UTC](https://community.grafana.com/t/access-multiple-variables-from-a-single-infinity-api-call/146964/1 "2025-03-23T22:18:04Z")

</div>

- What Grafana version and what operating system are you using?

Grafana v11.4.0 and Linux.

- **What** are you trying to achieve?

I want to extract multiple values from a single variable I build via an Infinity API call. Using the plugin I can arrange the return values as JSON {“hostname”:“host”,“interface\_name”:“intname1”} or a string “host1|intname1” but I can not figure out if it is possible to extract them later in Grafana? My goal would be to have this variable repeat to create new panels. The queries for each panel would be based on extracting different parts of the single variable.

I can get something similar working with rows. So hostname as my row variable and interface\_name for each panel. This works fine but I have a lot of graph with “no data” which I don’t want and can’t hide.

Any help much appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![yosiasz](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yosiasz/32/45847_2.png) [@yosiasz](https://community.grafana.com/u/yosiasz)\
**Post date:** [March 24, 2025, 5:04pm UTC](https://community.grafana.com/t/access-multiple-variables-from-a-single-infinity-api-call/146964/2 "2025-03-24T17:04:39Z")

</div>

You can do it implementing key value by returning the values as \_\_text and \_\_value

```auto
{" __text":"dc01","__ value":"intname1"} 

```

then refer to the variable which will give you 2 values

${var:text} will give you `dc01`  
${var:value} will give you `intname1`
