# Regarding grafana multi select variable

**URL:** <https://community.grafana.com/t/regarding-grafana-multi-select-variable/138083>\
**Category:** Dashboards\
**Created:** [December 10, 2024, 9:53am UTC](https://community.grafana.com/t/regarding-grafana-multi-select-variable/138083 "2024-12-10T09:53:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmitra](https://avatars.discourse-cdn.com/v4/letter/n/b5e925/32.png) [@nmitra](https://community.grafana.com/u/nmitra)\
**Post date:** [December 10, 2024, 9:53am UTC](https://community.grafana.com/t/regarding-grafana-multi-select-variable/138083/1 "2024-12-10T09:53:45Z")

</div>

Hi ,

I am using a multi-select custom variable ( E.g var\_name )

I formatted it as a JSON array using the below syntax:

```
     ${var_name:json}

```

Now, my requirement is to extract the individual elements of the array and store it in other variables and use those variables for some other query.

How to do it in Grafana ? Any suggestions ?

```
Instead of converting the multi-select variable to JSON array and then extracting , is there any way to extract the individual elements of a multi select variable directly and store those in some variables.

```

Please let me know.

This is a bit urgent for my project requirement.

```
Any quick response would be welcome.

```

Thanks,  
Nilanjan

---

<div class="post-metadata">

**Author:** ![sowdenraymond](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/sowdenraymond/32/38541_2.png) [@sowdenraymond](https://community.grafana.com/u/sowdenraymond)\
**Post date:** [December 10, 2024, 9:59am UTC](https://community.grafana.com/t/regarding-grafana-multi-select-variable/138083/2 "2024-12-10T09:59:27Z")

</div>

you could try the infinity plugin, and use the json inline option, where you specify a payload, and then use your variable as the payload…

---

<div class="post-metadata">

**Author:** ![nmitra](https://avatars.discourse-cdn.com/v4/letter/n/b5e925/32.png) [@nmitra](https://community.grafana.com/u/nmitra)\
**Post date:** [December 10, 2024, 10:20am UTC](https://community.grafana.com/t/regarding-grafana-multi-select-variable/138083/3 "2024-12-10T10:20:10Z")

</div>

Hi ,

I am using infinity plugin with inline JSON and UQL parser .

My query is as below

parse-json data = ‘${var\_name:json}’  
| project first\_element = data[0], second\_element = data[1], third\_element = data[2], fourth\_element = data[3]

* * *

But still I am not able to extract any value.

What could be the reason here …

Thanks,  
Nilanjan
