MongoDB query to pull data in grafana

I have below JSON in mongoDB:
“browsingHistory” : {
“connectionStatus” : {
“totalViews” : “200”,
“othersTotal” : “2”,
“timeStamp” : “2019-05-05 00:00:00”
},
“connectionPaymentOption” : {
“totalMinDue” : “20”,
“totalOthersAmnt” : “10”,
“othersTotal” : “5”,
“timeStamp” : “2019-05-05 00:00:00”
},
“connectionEnrollAmount” : {
“totalEnrollAmount” : 0,
“timeStamp” : “2019-05-05 00:00:00”
}
}

I have to convert this data into a format that grafana accepts and draws a chart.
What way should I write query in mongo. I tried
db.test.aggregate([
{ “group": { "_id": "_id”,
“cnt” : { “$sum” : 1 }, “ts” : { “$max” : “$ts” }
}}
])

but nothing seems to work, please help.

I am using JAmes Osgood MongoDb plugin.

Appreciate your help, thanks

Hello!

I would appreciate if someone could post at least a hint on that.
Really struggling in trying to make it work.
Is there any documentation or example at least?

Thanks in advance

Did you find any information on this? Looking for the same answer.