question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use variables in additional JSON data

See original GitHub issue

The README says “it’s possible to enter variables in the additional JSON data” and that they “should not be enclosed in quotes

But when I try something like this:

{ "additional": "optional json", "testvar": $testvar }

Grafana errors with Unexpected token $ in JSON at position 44. It works fine without variables. Am I doing something wrong ?

Grafana v5.2.2 grafana-json-datasource v0.1.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
simPodcommented, Mar 20, 2019

@cmoroexpedia can you try upgrading ur grafana?

I’ve only discovered that selecting All doesn’t pass all values. I didn’t notice that as I use it in a bit non-standard way so I have never manually selected variable before 😃 I have created an issue for that https://github.com/simPod/grafana-json-datasource/issues/31

1reaction
simPodcommented, Mar 19, 2019

I’ll try it on my own tomorrow

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't access variables of JSON response from REST-API in ...
I have only read, that it does not work because of the wrong JSON-structure. In other threads, they say there has to be...
Read more >
Solved: Cannot set variable from Parsed JSON
I cannot seem to set/initialize a variable with any data from the parsed JSON. The variable that I am using is the customer...
Read more >
How to concatenate 2 JSON object variables - Claris Community
I can add additional parameters to an existing JSON variable, but how to concatenate 2 existing $var? {. "contact_type" : "psn". }.
Read more >
How To Use JSON in Go - DigitalOcean
Programs need to store data their own data and communicate with each other. JSON is a popular way to do both. In this...
Read more >
Can't access variables from json - Just getting started - Postman
The problem is i can't figure how to access the values i need. ... I've created a variable to store your sample and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found