<?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: Nested JSON in GUI in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291410#M55547</link>
    <description>&lt;P&gt;Have you tried the &lt;CODE&gt;spath&lt;/CODE&gt; command:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Spath"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Spath&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2017 18:58:11 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-03-22T18:58:11Z</dc:date>
    <item>
      <title>Nested JSON in GUI</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291409#M55546</link>
      <description>&lt;P&gt;Hi. I have an JSON event that has nested arrays of objects within it. &lt;/P&gt;

&lt;P&gt;In the Search app, it "prettifies" the top level of the JSON event, but does not provide us with a "pretty" form of nested arrays/objects. Unfortunately, the data is sensitive so I cannot provide a screenshot. But basically I'd like to be able to click the +/- sign and drill down into the nested JSON event. Instead, nested JSON is represented by a single string which is difficult to read.&lt;/P&gt;

&lt;P&gt;I can use spath to extract the nested JSON fields, that's works, but we'd like to be able to explore the JSON in a drill-down fashion within the Search app.&lt;/P&gt;

&lt;P&gt;I have verified that our JSON is valid. &lt;/P&gt;

&lt;P&gt;Is there something I need to do to get the GUI to understand nested JSON?&lt;/P&gt;

&lt;P&gt;Sorry if this question seems vague, just not sure how else to ask.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 16:47:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291409#M55546</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2017-03-22T16:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Nested JSON in GUI</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291410#M55547</link>
      <description>&lt;P&gt;Have you tried the &lt;CODE&gt;spath&lt;/CODE&gt; command:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Spath"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Spath&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 18:58:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291410#M55547</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-22T18:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Nested JSON in GUI</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291411#M55548</link>
      <description>&lt;P&gt;Yes, I mentioned in my question then spath will extract the fields, but we can't drill down within the search app. &lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 19:45:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291411#M55548</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2017-03-22T19:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Nested JSON in GUI</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291412#M55549</link>
      <description>&lt;P&gt;you need to adjust your sourcetype at the time of ingestion. I successfully followed ideas from &lt;A href="https://answers.splunk.com/answers/148307/how-to-parse-and-extract-json-log-files-in-splunk.html"&gt;https://answers.splunk.com/answers/148307/how-to-parse-and-extract-json-log-files-in-splunk.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 18:00:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291412#M55549</guid>
      <dc:creator>droopy4096</dc:creator>
      <dc:date>2017-04-14T18:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Nested JSON in GUI</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291413#M55550</link>
      <description>&lt;P&gt;So I found this problem annoying enough to write a custom search command to solve it.   Maybe someday the Splunk UI will off an "expand all" feature, making nested JSON structures easier to navigate, but in the meantime this is what I do.&lt;/P&gt;

&lt;P&gt;I have an app called &lt;A href="https://splunkbase.splunk.com/app/3237/"&gt;JMESPath&lt;/A&gt; that includes an extra helper search command called &lt;CODE&gt;jsonformat&lt;/CODE&gt; that does exactly what you're looking for.  If your event is a JSON string, you can just call &lt;CODE&gt;... | jsonformat&lt;/CODE&gt; and it will replace the &lt;CODE&gt;_raw&lt;/CODE&gt; field (the text of your event) with a formatted JSON string.  This can also optionally sort the JSON object, set a custom indentation level, or format json fields (like after calling &lt;CODE&gt;spath&lt;/CODE&gt;).  There are many possibilities.&lt;/P&gt;

&lt;P&gt;For more examples and use cases, see the &lt;A href="https://github.com/Kintyre/jmespath/wiki/Command-Reference-jsonformat"&gt;jsonformat&lt;/A&gt; command reference. &lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 23:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Nested-JSON-in-GUI/m-p/291413#M55550</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2018-11-20T23:54:27Z</dc:date>
    </item>
  </channel>
</rss>

