<?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: Help with parsing this json data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628428#M218281</link>
    <description>&lt;P&gt;Thank you &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; for your help.&lt;BR /&gt;&lt;BR /&gt;I get the correct number of rows (Events(3)) but with empty values.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 08:42:36 GMT</pubDate>
    <dc:creator>sdhiaeddine</dc:creator>
    <dc:date>2023-01-26T08:42:36Z</dc:date>
    <item>
      <title>How to parse this json data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628310#M218252</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Please could you help with parsing this json data to table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
	"list_element": [
		{
			"element": "{\"var1\":\"1.1.8.8:443\",\"var2\":\"1188\"}"
		},
		{
			"element": "{\"var1\":\"8.8.1.1:443\",\"var2\":\"8811\"}"
		},
		{
			"element": "{\"var1\":\"1.2.3.4:443\",\"var2\":\"1234\"}"
		}
	]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The result should look like:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;var1&lt;/TD&gt;
&lt;TD width="50%"&gt;var2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;1.1.8.8:443&lt;/TD&gt;
&lt;TD width="50%"&gt;1188&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;8.8.1.1:443&lt;/TD&gt;
&lt;TD width="50%"&gt;8811&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1.2.3.4:443&lt;/TD&gt;
&lt;TD&gt;1234&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Thu, 26 Jan 2023 19:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628310#M218252</guid>
      <dc:creator>sdhiaeddine</dc:creator>
      <dc:date>2023-01-26T19:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with parsing this json data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628316#M218253</link>
      <description>&lt;LI-CODE lang="markup"&gt;| spath list_element{} output=list_element
| mvexpand list_element
| spath input=list_element
| spath input=element
| table var1 var2&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 Jan 2023 17:27:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628316#M218253</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-01-25T17:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help with parsing this json data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628428#M218281</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt; for your help.&lt;BR /&gt;&lt;BR /&gt;I get the correct number of rows (Events(3)) but with empty values.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 08:42:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628428#M218281</guid>
      <dc:creator>sdhiaeddine</dc:creator>
      <dc:date>2023-01-26T08:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help with parsing this json data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628433#M218283</link>
      <description>&lt;P&gt;It sounds like your example isn't a close enough match to your actual events. Here is a example of it working correctly with your sample data.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="{
	\"list_element\": [
		{
			\"element\": \"{\\\"var1\\\":\\\"1.1.8.8:443\\\",\\\"var2\\\":\\\"1188\\\"}\"
		},
		{
			\"element\": \"{\\\"var1\\\":\\\"8.8.1.1:443\\\",\\\"var2\\\":\\\"8811\\\"}\"
		},
		{
			\"element\": \"{\\\"var1\\\":\\\"1.2.3.4:443\\\",\\\"var2\\\":\\\"1234\\\"}\"
		}
	]
}"
| spath list_element{} output=list_element
| mvexpand list_element
| spath input=list_element
| spath input=element
| table var1 var2&lt;/LI-CODE&gt;&lt;P&gt;If you need any further help, please can you share your actual events, anonymised of course.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 09:10:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628433#M218283</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-01-26T09:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help with parsing this json data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628439#M218284</link>
      <description>&lt;P&gt;This is the actual event format&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{event_disabled: false
internal_event_id: 124578_1245
name: ELEMENT_EVENT
element_list: {"list_element":[{"element": "{\"var1\":\"1.1.8.8:443\",\"var2\":\"1188\"}"},{"element": "{\"var1\":\"8.8.1.1:443\",\"var2\":\"8811\"}"},{"element": "{\"var1\":\"1.2.3.4:443\",\"var2\":\"1234\"}"}]}
phone_number: 123456789
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 15:16:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628439#M218284</guid>
      <dc:creator>sdhiaeddine</dc:creator>
      <dc:date>2023-01-26T15:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help with parsing this json data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628579#M218350</link>
      <description>&lt;P&gt;If that is really the actual event, the developers deserve spanking. &amp;nbsp;This is not conformant JSON but near garbage. &amp;nbsp;First off, the nodes are not properly separated by comma. &amp;nbsp;Secondly, keys and text values are not properly quoted all the way through.&lt;/P&gt;&lt;P&gt;Is it possible that the&amp;nbsp;&lt;STRONG&gt;actual&amp;nbsp;&lt;/STRONG&gt;"actual" event format is like this instead?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"event_disabled": false,
"internal_event_id": "124578_1245",
"name": "ELEMENT_EVENT",
"element_list": {"list_element":[{"element": "{\"var1\":\"1.1.8.8:443\",\"var2\":\"1188\"}"},{"element": "{\"var1\":\"8.8.1.1:443\",\"var2\":\"8811\"}"},{"element": "{\"var1\":\"1.2.3.4:443\",\"var2\":\"1234\"}"}]},
"phone_number": 123456789
}&lt;/LI-CODE&gt;&lt;P&gt;It is extremely important to present accurate data if you want to get concrete help (as opposed to seek general ideas).&lt;/P&gt;&lt;P&gt;Meanwhile, if the data is as I posted above, Splunk would have already given you a multivalue field named&amp;nbsp;element_list.list_element{}.element. &amp;nbsp;You'll need to run mvexpand on that as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;suggested, then spath again.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mvexpand element_list.list_element{}.element
| spath input=element_list.list_element{}.element
| table var1 var2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 07:40:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-parse-this-json-data/m-p/628579#M218350</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-01-27T07:40:43Z</dc:date>
    </item>
  </channel>
</rss>

