How to display an array of JSON objects as JSON

I’m on version 11.1.3

The data source is MongoDB. I have a field that is an array of JSON objects. It shows as an array of maps in a Table. I tried to set the Cell Type to JSON View but it doesnt help.

This is an example of a source record in mongodb.

{ "a" : 100, 
  "b" : "hello",
  "events": [ { "event_dt" : "2024-10-01",  "event_server" : "10,3,40.123"},
                   { "event_dt" : "2024-10-02",  "event_server" : "10.1.50.212"}
                 ]
}

The events fields displays as an array of maps like this in the Table in Grafana :
[map[ event_dt : 2024-10-01 event_server: 10.3.40.123] map[ event_dt : 2024-10-02 event_server: 10.1.50.212 ] ]

How do i get it to display as in JSON format ?

TIA !!

what visualization will you be using to display your data

A Table.

maybe use business text plugin

Hi @yosiasz
I don’t want it flattened. I want the whole Events field to be rendered as a JSON value. Flattening it will create noise as there can be a lot of fields of occasional value to users.

1 Like

like this?

or using the Business Table plugin - @mikhailvolkov

1 Like

This looks like it will do it. But how do I use a Business Table plug in. Sorry, I have only basic knowledge of Grafana.

Thanks.

@yosiasz Can you tell me how you did it in the first screenshot above ?
Thats what im looking for.
Thanks

it’s pretty self explanatory. read the Business text plugin, try it out based on your data and when stuck post back and would be happy to help you.