# Grafana - getting empty return value when my variable contains "." operator in it

**URL:** <https://community.grafana.com/t/grafana-getting-empty-return-value-when-my-variable-contains-operator-in-it/123296>\
**Category:** Dashboards\
**Tags:** dashboard-variables, infinity-datasource, json\
**Created:** [June 5, 2024, 12:11pm UTC](https://community.grafana.com/t/grafana-getting-empty-return-value-when-my-variable-contains-operator-in-it/123296 "2024-06-05T12:11:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamblesneha184](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@kamblesneha184](https://community.grafana.com/u/kamblesneha184)\
**Post date:** [June 5, 2024, 12:11pm UTC](https://community.grafana.com/t/grafana-getting-empty-return-value-when-my-variable-contains-operator-in-it/123296/1 "2024-06-05T12:11:13Z")

</div>

I am using Grafana chained variables with infinity datasource and variable value which is passed dynamically is like this - GW12-RHEL.91

{  
“Hosts”: [  
“GW12-RHEL.91”  
],  
“Data”: {  
“GW12-RHEL.91”: {  
“Tx”: [  
“TestTopic.1”  
]  
}  
}  
}

But when I access value by writing below query in Parsing Option, it returns empty value.

Parsing query -

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/7/5/7522419bea1ec1a5673a121f677dcf028c1d87d6.png)

Result -  
 ![image](https://us1.discourse-cdn.com/grafana/original/3X/c/d/cd130e3c45e9a29898903a6b96d2d1198bb0c7f9.png)

Also, tried few other options -  
Data.‘GW12-RHEL.91’.Tx  
Data.${Hostname:raw}.Tx  
Data.${Hostname:singlequote}.Tx

However, when I remove “.” from variable it works  
Parsing Query without “.”  
 ![image](https://us1.discourse-cdn.com/grafana/original/3X/f/0/f0a116ed7a2cd3b43e4b12e9281182a965fa5333.png)

Results -  
 ![image](https://us1.discourse-cdn.com/grafana/original/3X/e/9/e94aeed71124b18ad9af5a191deccf3b0c24de77.png)

Can someone help me what changes do I need to do to my configuration where I am getting variable value?w

---

<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:** [June 5, 2024, 12:47pm UTC](https://community.grafana.com/t/grafana-getting-empty-return-value-when-my-variable-contains-operator-in-it/123296/2 "2024-06-05T12:47:40Z")

</div>

i do not see .tx in the sample data

---

<div class="post-metadata">

**Author:** ![kamblesneha184](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@kamblesneha184](https://community.grafana.com/u/kamblesneha184)\
**Post date:** [June 5, 2024, 1:01pm UTC](https://community.grafana.com/t/grafana-getting-empty-return-value-when-my-variable-contains-operator-in-it/123296/3 "2024-06-05T13:01:54Z")

</div>

Typo mistake. Updated json data

---

<div class="post-metadata">

**Author:** ![dudhaniss](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@dudhaniss](https://community.grafana.com/u/dudhaniss)\
**Post date:** [June 6, 2024, 9:50am UTC](https://community.grafana.com/t/grafana-getting-empty-return-value-when-my-variable-contains-operator-in-it/123296/4 "2024-06-06T09:50:36Z")

</div>

The _Hostname_ variable seems to contain the value from your initial query (specifically GW12-RHEL.91). You are encountering an issue when using this variable value to execute another query to retrieve information about that specific hostname from the data section.

Additionally, I understand that if the Hostname variable holds a value with a DOT in it, the second query does not produce any output.

I think ${Hostname:raw} should work to escape the DOT. If it’s not, then it looks like there is some issue with the Infinity Plugin.

---

<div class="post-metadata">

**Author:** ![yesoreyeram](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yesoreyeram/32/52152_2.png) [@yesoreyeram](https://community.grafana.com/u/yesoreyeram)\
**Post date:** [June 6, 2024, 11:18am UTC](https://community.grafana.com/t/grafana-getting-empty-return-value-when-my-variable-contains-operator-in-it/123296/5 "2024-06-06T11:18:10Z")

</div>

I am not sure what parser you are using. Here is the example using backend parser where you can use [JSONata](https://docs.jsonata.org/simple) based selectors. I am using ` to escape the special characters as specified in the JSONata

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/6/a/6a1134f3fe7ef2183f388a84183fd4e853b5b54e.png)
