How to extract json value from elasticsearch source

  • What Grafana version and what operating system are you using?
    Grafana v10.4.2

  • What are you trying to achieve?

Using a datasource in elasticsearch I want to extract a field. I THINK I can use transform but nothing seem valid.

For example:

But nothing seems to change when I add that transform. I also am not using any query if that matters:

Thanks!

please post sample json not as an image but as actualy json string

Hi,

Figured out the issue. It wasn’t the lucene query I needed to change to flatten the nested component. The trick was the do a Transform with extracted field:

components:
[ { "key: 0, "key2": "val2", "key3": 1, "key4": true}, {},{},{} ]

Now that its Extracted I perform a 2nd extraction:

Then I can it will create the proper variables and I can get to each of the keys being represented into columns

1 Like