# Get value from key value pair

**URL:** <https://community.dynatrace.com/t/get-value-from-key-value-pair/41862>\
**Category:** DQL\
**Tags:** dql\
**Created:** [September 29, 2023, 2:47pm UTC](https://community.dynatrace.com/t/get-value-from-key-value-pair/41862 "2023-09-29T14:47:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sinisa\_zubic](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/sinisa_zubic/32/32498_2.png) [@sinisa\_zubic](https://community.dynatrace.com/u/sinisa_zubic)\
**Post date:** [September 29, 2023, 2:54pm UTC](https://community.dynatrace.com/t/get-value-from-key-value-pair/41862/2 "2023-09-29T14:54:51Z")

</div>

Hi&nbsp;[@OustiDiousti](https://community.dynatrace.com/user/55612)

Please check out our documentation about how to query entities in Grail:&nbsp;[Query monitored entities in Grail — Dynatrace Docs](https://www.dynatrace.com/support/help/platform/grail/querying-monitored-entities#entity-tags)

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

```markup
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

---

_[View the full topic](https://community.dynatrace.com/t/get-value-from-key-value-pair/41862)._
