<?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 Re: Display parts of an event as JSON in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333412#M61636</link>
    <description>&lt;P&gt;@mrg_linus, the above view is only available with visualization selected as &lt;CODE&gt;Events&lt;/CODE&gt;. Even in your screenshot you would notice a link to toggle the event view between &lt;CODE&gt;Show syntax higlighted&lt;/CODE&gt; and &lt;CODE&gt;Show as raw text&lt;/CODE&gt;. You can use the same in Event visualization but with your JSON subset as a new field.&lt;/P&gt;

&lt;P&gt;Following is sample Simple XML with &lt;CODE&gt;event&lt;/CODE&gt;view. Replace your actual search to try out:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;row&amp;gt;
        &amp;lt;panel&amp;gt;
          &amp;lt;event&amp;gt;
            &amp;lt;search&amp;gt;
              &amp;lt;query&amp;gt;MYSEARCH 
| spath output=myfield path="message.model" 
| table myfield&amp;lt;/query&amp;gt;
              &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
              &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
              &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
            &amp;lt;/search&amp;gt;
            &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
            &amp;lt;option name="list.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
            &amp;lt;option name="list.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
            &amp;lt;option name="maxLines"&amp;gt;5&amp;lt;/option&amp;gt;
            &amp;lt;option name="raw.drilldown"&amp;gt;full&amp;lt;/option&amp;gt;
            &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
            &amp;lt;option name="rowNumbers"&amp;gt;0&amp;lt;/option&amp;gt;
            &amp;lt;option name="table.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
            &amp;lt;option name="table.sortDirection"&amp;gt;asc&amp;lt;/option&amp;gt;
            &amp;lt;option name="table.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
            &amp;lt;option name="type"&amp;gt;list&amp;lt;/option&amp;gt;
          &amp;lt;/event&amp;gt;
        &amp;lt;/panel&amp;gt;
      &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 25 Oct 2017 12:23:14 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-10-25T12:23:14Z</dc:date>
    <item>
      <title>Display parts of an event as JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333411#M61635</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3735iF6CE097DBE73522D/image-size/large?v=v2&amp;amp;px=999" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;What I want to do is display the content of the message.model. However when I attempt to do this with things as &lt;/P&gt;

&lt;P&gt;MYSEARCH  | spath output=myfield path="message.model" | table myfield&lt;BR /&gt;
the output is not visualized as JSON (but as text with no spaces, indentation or linebreaks).&lt;/P&gt;

&lt;P&gt;I want the same visualization as in the attached image, but ONLY the message.model.&lt;/P&gt;

&lt;P&gt;How do I achieve this?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 10:01:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333411#M61635</guid>
      <dc:creator>mrg_linus</dc:creator>
      <dc:date>2017-10-25T10:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Display parts of an event as JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333412#M61636</link>
      <description>&lt;P&gt;@mrg_linus, the above view is only available with visualization selected as &lt;CODE&gt;Events&lt;/CODE&gt;. Even in your screenshot you would notice a link to toggle the event view between &lt;CODE&gt;Show syntax higlighted&lt;/CODE&gt; and &lt;CODE&gt;Show as raw text&lt;/CODE&gt;. You can use the same in Event visualization but with your JSON subset as a new field.&lt;/P&gt;

&lt;P&gt;Following is sample Simple XML with &lt;CODE&gt;event&lt;/CODE&gt;view. Replace your actual search to try out:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;row&amp;gt;
        &amp;lt;panel&amp;gt;
          &amp;lt;event&amp;gt;
            &amp;lt;search&amp;gt;
              &amp;lt;query&amp;gt;MYSEARCH 
| spath output=myfield path="message.model" 
| table myfield&amp;lt;/query&amp;gt;
              &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
              &amp;lt;latest&amp;gt;&amp;lt;/latest&amp;gt;
              &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
            &amp;lt;/search&amp;gt;
            &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
            &amp;lt;option name="list.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
            &amp;lt;option name="list.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
            &amp;lt;option name="maxLines"&amp;gt;5&amp;lt;/option&amp;gt;
            &amp;lt;option name="raw.drilldown"&amp;gt;full&amp;lt;/option&amp;gt;
            &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
            &amp;lt;option name="rowNumbers"&amp;gt;0&amp;lt;/option&amp;gt;
            &amp;lt;option name="table.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
            &amp;lt;option name="table.sortDirection"&amp;gt;asc&amp;lt;/option&amp;gt;
            &amp;lt;option name="table.wrap"&amp;gt;1&amp;lt;/option&amp;gt;
            &amp;lt;option name="type"&amp;gt;list&amp;lt;/option&amp;gt;
          &amp;lt;/event&amp;gt;
        &amp;lt;/panel&amp;gt;
      &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Oct 2017 12:23:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333412#M61636</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-25T12:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display parts of an event as JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333413#M61637</link>
      <description>&lt;P&gt;I'm the slowest person in the world &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;that being said this is the finished result using your xml code in my dashboard&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3733i67A52756CC8F3611/image-size/large?v=v2&amp;amp;px=999" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 11:33:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333413#M61637</guid>
      <dc:creator>mrg_linus</dc:creator>
      <dc:date>2018-03-27T11:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Display parts of an event as JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333414#M61638</link>
      <description>&lt;P&gt;Sadly Im not allowed to upload pictures. Therefore Im using multiple answers in order to do so. Probably something you might want to look into.&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3734i7B2E463D067E8E75/image-size/large?v=v2&amp;amp;px=999" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 11:34:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333414#M61638</guid>
      <dc:creator>mrg_linus</dc:creator>
      <dc:date>2018-03-27T11:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Display parts of an event as JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333415#M61639</link>
      <description>&lt;P&gt;Poke. Find the result of your suggestion below.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 11:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Display-parts-of-an-event-as-JSON/m-p/333415#M61639</guid>
      <dc:creator>mrg_linus</dc:creator>
      <dc:date>2018-03-27T11:36:27Z</dc:date>
    </item>
  </channel>
</rss>

