Parsing error in jsonata

  • What Grafana version and what operating system are you using?
    Grafana v11.0.0
    OS windows 10

  • What are you trying to achieve?
    Parse query using jsonata

  • How are you trying to achieve it?
    See json and parsing below

  • What happened?
    Getting error:
    error getting data frame from inline data. root object doesn’t exist in the response.

  • What did you expect to happen?
    see details below

  • Can you copy/paste the configuration(s) that you are having problems with?
    I used JSONata Exerciser from web: https://try.jsonata.org/
    to parse the json. This works well and the outcome can be visualized by grafana.

However, when uploading the data, and using jsonata parsing (same code), I get an error

Error on grafana

parsing in JSONata Exerciser

Visualization by using the JSONata Exerciser as grafana data

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    error getting data frame from inline data. root object doesn’t exist in the response. Root selector: ( $a:=People{$string(rank):data} ~> $each(function($r, $d){ $r{time: hight} ~> $each(function($v, $k) { { “rank”:$d.$number(), “time”: $k.$number(), “dataPoint”: $average($v.$number()) } } ) }); $a.*; )

  • Did you follow any online instructions? If so, what is the URL?

  • No

Did you try UQL parser? I.e.

parse-json
| jsonata "PUT YOUR JSONATA HERE"

the query must also be in one looooong line