Using JSONata with Grafana for using with Infinity data source plugin

so this returns what you might need.
($map( $.hits.hits._source, function($v, $i, $a) {{'values': $v.values[0],'serialNumber': $v.serialNumber}}))

| jsonata "($map```

Yes that is exactly what I needed . I had already tried it but figured I was talking to someone else and wanted to see if there was a different way to do the same thing

so did it work before trying a different way to do the same thing?

anyways another question you did not answer is why is a data point in your OS result set return an array with one value only? that smells suspect

Yeah its been working

Yeah so i talked to my manager, apparently that is the way that data is fed in for all of our queries inside our data source. For other metrics, this is not a single element array, but for this case it is

so best thing to do more stuff is to read docu for jsonata
https://docs.jsonata.org/

Looks like ima get very familiar with this in the coming weeks. Very useful tool.