<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Transform String to JSON in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Transform-String-to-JSON/m-p/227629#M330</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hey team how would I convert a "content" string field into JSON object?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;The Content field is a "stringified" JSON object, is there a DQL command that would convert this into a JSON object. stdout F preludes the JSON object which is what I believe is causing Dynatrace to see this&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;content field as a string and not JSON.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;For comparison here is another log event structured as pure JSON&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/15157i9A528BAADB91072D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2.png" alt="Screenshot_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Nov 2023 15:17:13 GMT</pubDate>
    <dc:creator>nicoe_welch</dc:creator>
    <dc:date>2023-11-03T15:17:13Z</dc:date>
    <item>
      <title>Transform String to JSON</title>
      <link>https://community.dynatrace.com/t5/DQL/Transform-String-to-JSON/m-p/227629#M330</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hey team how would I convert a "content" string field into JSON object?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;The Content field is a "stringified" JSON object, is there a DQL command that would convert this into a JSON object. stdout F preludes the JSON object which is what I believe is causing Dynatrace to see this&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;content field as a string and not JSON.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;For comparison here is another log event structured as pure JSON&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/15157i9A528BAADB91072D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2.png" alt="Screenshot_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 15:17:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Transform-String-to-JSON/m-p/227629#M330</guid>
      <dc:creator>nicoe_welch</dc:creator>
      <dc:date>2023-11-03T15:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Transform String to JSON</title>
      <link>https://community.dynatrace.com/t5/DQL/Transform-String-to-JSON/m-p/227631#M331</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/10367"&gt;@nicoe_welch&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try if this DQL query works&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch logs
| parse content, "DATA json:json"
| fieldsAdd appId = json[appId], level = json[level]&lt;/LI-CODE&gt;
&lt;P&gt;Basically you need to parse the content and extract the json information from the content. With using the fieldsAdd command you can add nested json fields to be visible on top level.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 15:42:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Transform-String-to-JSON/m-p/227631#M331</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-11-03T15:42:58Z</dc:date>
    </item>
  </channel>
</rss>

