Adding a Json object not array

Hello I am new to Grafana,

I am trying to use an API I have formatted the API to a JSON, but it is an object instead of an array.
My question is simple, how to I display JSON object data in Grafana. Right now it is saying no data.

I am using the plugin infinity but if you have other way that is fine to.

Kind regards,
Jessy2
Sorry for bad English

Can you provide an example of a JSON response from your API? Something so user’s can try and mock up your data?

{“peer1”:658,“peer2”:582,“peer3”:652,“peer4”:552,“total”:2444}

Hi @jessy2 I tried using JSON server to mock up your data but it complained that this not a valid JSON object. This worked, however, which is not an array but a more clearly defined single object:

{
  "foo": {
  "peer1":658,
  "peer2":582,
  "peer3":652,
  "peer4":552,
  "total":2444
  }
}

I have formatted the API to a JSON

I would advise tweaking the formatting of your JSON. Is that possible?

Hi @jessy2 have you tried this Grafana

Thank you all for your help I figured it out if I use selectors and set them to string it works thank you all.