0

I have a json of the following format

{"contextKeys": [
{"name":"DataDogQues"},
{"priority":"high"}],
"comment":"Please Help!"
}

I am trying to fetch the value of name alone in Monitors but I am unable to do so. log.attributes.[contextKeys.name] fetches the entires conextKeys json array.

Is there any means to fetch just the name from contextKeys in Monitors? Thanks in advance.

1 Answers1

0

Use the following path in Monitors:

log.attributes.contextKeys.0.name

'.0': selects the first element of the array (index 0).

'.name': extracts the "name" field from the selected element.

Nadir Belhaj
  • 11,953
  • 2
  • 22
  • 21