# DQL/DPL question/puzzle

**URL:** <https://community.dynatrace.com/t/dql-dpl-question-puzzle/49524>\
**Category:** DQL\
**Tags:** dql, notebooks, dpl\
**Created:** [December 31, 2024, 10:30am UTC](https://community.dynatrace.com/t/dql-dpl-question-puzzle/49524 "2024-12-31T10:30:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [December 31, 2024, 10:30am UTC](https://community.dynatrace.com/t/dql-dpl-question-puzzle/49524/1 "2024-12-31T10:30:01Z")

</div>

Hello,

Last day of the year question/puzzle…

When showing tags from a host, an array is retuned.

I want to extract the contents of a specific tag.

So my thought was to convert the array to a string, and use DPL to extract the value.

Am I on the correct track, or maybe there are better ways to achieve this?

For later, happy new year!

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [January 1, 2025, 8:59pm UTC](https://community.dynatrace.com/t/dql-dpl-question-puzzle/49524/2 "2025-01-01T20:59:16Z")

</div>

[@henk\_stobbe](https://community.dynatrace.com/user/11427)&nbsp;yes, this is one of the solutions. you can also use a combination of expand / parse / filter - for example how get the dt.owner tag value:

```markup
fetch dt.entity.host
| fieldsAdd tags
| expand tags
| parse tags, """((LD:tag (!<<'\\' ':') LD:value)|LD:tag)"""
| fieldsAdd dt.owner = if(isNotNull(value), value)
| filter tag=="dt.owner"
| fieldsRemove value, tags, tag

```

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [January 2, 2025, 8:06am UTC](https://community.dynatrace.com/t/dql-dpl-question-puzzle/49524/3 "2025-01-02T08:06:17Z")

</div>

Hi Julius,

Best wishes! And thanks for your great answer,

KR Henk
