I’m looking for a bit of help with counting unique results of a json query and displaying as a stat.
I have a json data source that amongst other things used to shows a list of docker containers that I have running. I’m able to successfully use this data source to display a table of these, using the query $.[‘docker’][‘details’][‘containers’][?(@.status== ‘started’)].name
I’d like to be able to show a stat with the number of containers running, rather than a list. I could do that by counting the unique results of the above query. This is as far as my knowledge goes though, so my question is does any one know how I can count the unique results of the existing query?