<?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 Visualize JSON array of array in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331120#M98556</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I would like to convert the following event into a table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
   Id: 1505207351   
   Start: 1505207651    
   Resource: res    
   Nodes: [ 
            [ res1, 1 ] , [ res2, 3 ]   
       ]    
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The output should be a table like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Id        |    Start   | Nodes
1505207351 | 1505207651 | [res1,1] , [res2,3]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or even better, display a subtable in the Nodes column:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Id        |    Start   |    Nodes
           |            | Res | Rank
-------------------------------------
1505207351 | 1505207651 | res1 | 1 
                        | res2 | 3
------------------------------------
2305207351 | 2305207651 | res3 | 4 
                        | res4 | 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The event  sourcetype is _json&lt;BR /&gt;
My actual query to search the events is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myindex" | spath | table Id, Start, Nodes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The result is a table but the Nodes column is empty&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 12 Sep 2017 11:55:43 GMT</pubDate>
    <dc:creator>faustf</dc:creator>
    <dc:date>2017-09-12T11:55:43Z</dc:date>
    <item>
      <title>Visualize JSON array of array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331120#M98556</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I would like to convert the following event into a table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
   Id: 1505207351   
   Start: 1505207651    
   Resource: res    
   Nodes: [ 
            [ res1, 1 ] , [ res2, 3 ]   
       ]    
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The output should be a table like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Id        |    Start   | Nodes
1505207351 | 1505207651 | [res1,1] , [res2,3]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or even better, display a subtable in the Nodes column:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Id        |    Start   |    Nodes
           |            | Res | Rank
-------------------------------------
1505207351 | 1505207651 | res1 | 1 
                        | res2 | 3
------------------------------------
2305207351 | 2305207651 | res3 | 4 
                        | res4 | 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The event  sourcetype is _json&lt;BR /&gt;
My actual query to search the events is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myindex" | spath | table Id, Start, Nodes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The result is a table but the Nodes column is empty&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 11:55:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331120#M98556</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-09-12T11:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Visualize JSON array of array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331121#M98557</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myindex" | spath | table Id, Start, Nodes* | rename Nodes{}{} as Nodes
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:59:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331121#M98557</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-12T13:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Visualize JSON array of array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331122#M98558</link>
      <description>&lt;P&gt;Great it worked.&lt;BR /&gt;
Is it difficult (or is it possible) to implement the subtable?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 15:01:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331122#M98558</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-09-12T15:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Visualize JSON array of array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331123#M98559</link>
      <description>&lt;P&gt;It will be difficult. Firstly, the dual level columns are not possible (SPlunk doesn't support merged columns like you see in excel), but you you would be able to do some workaround. How does the data looks in the columns Nodes after the queries? Can you post some actual sample values (mask anything that is sensitive)? Conversion of that to the subtable format (converting NOdes to multivalued field) will depend on it current format. May be run this and tell actual values on both Nodes and NodesCount column.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myindex" | spath | table Id, Start, Nodes* | rename Nodes{}{} as Nodes | eval NodesCount=mvcount(Nodes)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Sep 2017 15:36:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331123#M98559</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-12T15:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Visualize JSON array of array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331124#M98560</link>
      <description>&lt;P&gt;This is my current result: &lt;A href="https://www.dropbox.com/s/frv4b3ibph6xk5v/Screen%20Shot%202017-09-12%20at%2017.47.25.png?dl=0"&gt;link text&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 15:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331124#M98560</guid>
      <dc:creator>faustf</dc:creator>
      <dc:date>2017-09-12T15:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Visualize JSON array of array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331125#M98561</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="myindex" | spath | table Id, Start, Nodes* | rename Nodes{}{} as Nodes | rex field=Nodes max_match=0 "(?&amp;lt;Nodes_Res&amp;gt;\S+)\s+(?&amp;lt;Nodes_Rank&amp;gt;\d+)" 
|  table Id, Start, Nodes_Res Nodes_Rank
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Sep 2017 16:21:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Visualize-JSON-array-of-array/m-p/331125#M98561</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-12T16:21:42Z</dc:date>
    </item>
  </channel>
</rss>

