JSONPath Error: Unable to Parse Token max()

I want to get the maximum value from the given data but max() function shows error my data is as under

    "Items": [
            "queueName": "basic",
            "totalNumberOfCalls": 100,
            "longestCall": 10,
            "queueSLA": 50
            "queueName": "inBound-inq",
            "totalNumberOfCalls": 120,
            "longestCall": 11,
            "queueSLA": 60
            "queueName": "support-inq",
            "totalNumberOfCalls": 200,
            "longestCall": 15,
            "queueSLA": 65
            "queueName": "verification-inq",
            "totalNumberOfCalls": 80,
            "longestCall": 13,
            "queueSLA": 70
            "queueName": "booking-inq",
            "totalNumberOfCalls": 105,
            "longestCall": 14,
            "queueSLA": 75

I am using query max($…longestCall)
Please help me to solve this

would be nice to know which plugin you are using. And what do you want the final result to look like, which data points?

I am Using JSON API as data source plugin. and i want to get the queueName with longest call in queue and Queue name with minimum SLA value

1 Like

method #1 using jsonata (pretty sure even with jsonata there is a better way to do it)

1 Like

method #2 (lots of tranformation)

@yosiasz one more question can we make Sub penals inside a penal. I searched about that everyone said that it is not supported by grafana
Thank you

maybe stats is better

1 Like

might want to post another question on that and not hijack this one?

Sure Thanks @yosiasz you are very helpful and Kind Person Thanks again

1 Like

@yosiasz please have a look

Very good now would be a good time for you to fish as you have been shown how to fish :wink:

Go to this link and time to learn some jsonata


Paste the data coming from your Walkboard Demo. We have no idea what the data from that json api looks like

Here is the documentation for jsonata.

I am already reading about JSONata. Thanks for the help you are really a great person