<?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: JSON to table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/JSON-to-table/m-p/461086#M130050</link>
    <description>&lt;P&gt;@email2vamsi &lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH  | spath path=body{} output=b |mvexpand b | eval _raw=b | extract | fillnull value="None" | table srl Num Type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Sample Search&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{\"body\":[{\"srl\":\"1A\",\"Num\":60,\"Type\":\"x1\"},{\"srl\":\"2A\",\"Type\":\"x2\"}],\"date\":\"1585522807308\"}" 
| spath path=body{} output=b |mvexpand b | eval _raw=b | extract | fillnull value="None" | table srl Num Type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 30 Mar 2020 10:53:18 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2020-03-30T10:53:18Z</dc:date>
    <item>
      <title>JSON to table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/JSON-to-table/m-p/461085#M130049</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;

&lt;P&gt;I would like to display this json to the table mentioned below.&lt;BR /&gt;
Please help. Thank you.&lt;/P&gt;

&lt;P&gt;{"body":[{"srl":"1A","Num":60,"Type":"x1"},&lt;BR /&gt;
{"srl":"2A","Type":"x2"}],&lt;BR /&gt;
"date":1585522807308}&lt;/P&gt;

&lt;P&gt;srl---Num---Type&lt;BR /&gt;
~~~~~~~~~~~~&lt;BR /&gt;
1A---60 ----x1&lt;BR /&gt;
2A--None---x2&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 10:06:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/JSON-to-table/m-p/461085#M130049</guid>
      <dc:creator>email2vamsi</dc:creator>
      <dc:date>2020-03-30T10:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/JSON-to-table/m-p/461086#M130050</link>
      <description>&lt;P&gt;@email2vamsi &lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH  | spath path=body{} output=b |mvexpand b | eval _raw=b | extract | fillnull value="None" | table srl Num Type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Sample Search&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{\"body\":[{\"srl\":\"1A\",\"Num\":60,\"Type\":\"x1\"},{\"srl\":\"2A\",\"Type\":\"x2\"}],\"date\":\"1585522807308\"}" 
| spath path=body{} output=b |mvexpand b | eval _raw=b | extract | fillnull value="None" | table srl Num Type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 10:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/JSON-to-table/m-p/461086#M130050</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-03-30T10:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/JSON-to-table/m-p/461087#M130051</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Give a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{\"body\":[{\"srl\":\"1A\",\"Num\":60,\"Type\":\"x1\"},{\"srl\":\"2A\",\"Type\":\"x2\"}],\"date\":\"1585522807308\"}" 
| spath path=body{} output=temp 
| mvexpand temp 
| spath input=temp 
| fillnull value="None" 
| table srl,Num,Type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Mar 2020 11:05:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/JSON-to-table/m-p/461087#M130051</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-03-30T11:05:04Z</dc:date>
    </item>
  </channel>
</rss>

