Get value from key value pair

Hi team, want to have the result CS-MONITORING, how
fetch dt.entity.host
| expand tags
| filter contains(tags, “invoiced_team”)
| summarize str_tags = collectDistinct(tags)

Hi @OustiDiousti

Please check out our documentation about how to query entities in Grail: Query monitored entities in Grail — Dynatrace Docs

Basically you need to expand the array of tags and parse it

fetch dt.entity.host
| expand tag_string=tags
| filter contains(tag_string,"invoiced_team")
| parse tag_string, """(('['LD:tag_context ']' LD:tag_key (!<<'\\' ':') LD:tag_value)| (LD:tag_key (!<<'\\' ':') LD:tag_value)|LD:tag_key)"""

Best,
Sini