<?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: Splunk to split a multivalue json in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-split-a-multivalue-json/m-p/378099#M68396</link>
    <description>&lt;P&gt;Hi FrankVI&lt;/P&gt;

&lt;P&gt;I swore I tried something like your solution but I cannot hack it. &lt;BR /&gt;
Maybe I am starting to see stars and commas. &lt;/P&gt;

&lt;P&gt;Thanks for your speedy help! Really works! &lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2019 09:20:54 GMT</pubDate>
    <dc:creator>sssignals</dc:creator>
    <dc:date>2019-07-03T09:20:54Z</dc:date>
    <item>
      <title>Splunk to split a multivalue json</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-split-a-multivalue-json/m-p/378097#M68394</link>
      <description>&lt;P&gt;Hi Splunk community&lt;/P&gt;

&lt;P&gt;I have been trying for 2 days using spath, mvindex, split on the following json... this is a row in Splunk with 4 event sizes and times. Some event have 1 event size and time. Some have more. I want to access the individual event size and time eg. &lt;BR /&gt;
| table flowKey eventsize1 eventtime1 eventsize2 eventtime2&lt;BR /&gt;&lt;BR /&gt;
Please give me some advice and guidance. Thanks so much.&lt;/P&gt;

&lt;P&gt;{"_id":{"$oid":"dfsahu13fd"},"flowKey":"null,null,...", "size_of_events":[1.1121356e+08,1.1121357e+08,1.1121357e+08,1.1121358e+08],"time_of_events":[{"$numberLong":"1548454548"},{"$numberLong":"1548454549"},{"$numberLong":"1548454555"},{"$numberLong":"1548454559"}]...}&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:13:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-split-a-multivalue-json/m-p/378097#M68394</guid>
      <dc:creator>sssignals</dc:creator>
      <dc:date>2020-09-30T01:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk to split a multivalue json</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-split-a-multivalue-json/m-p/378098#M68395</link>
      <description>&lt;P&gt;Dealing with a variable number of fields is going to be difficult, I don't know of any proper way to do that.&lt;/P&gt;

&lt;P&gt;Is there a large variance in the number of sizes and times that can be in an event? If it is limited to max. 5 or so, you could do something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...do rex/spath extractions that result in mulitvalued fields `eventsizes` and `eventtimes`...
| eval eventsize1 = mvindex(eventsizes,0)
| eval eventsize2 = mvindex(eventsizes,1)
| eval eventsize3 = mvindex(eventsizes,2)
| eval eventsize4 = mvindex(eventsizes,3)
| eval eventsize5 = mvindex(eventsizes,4)
| eval eventtime1 = mvindex(eventtimes,0)
| eval eventtime2 = mvindex(eventtimes,1)
| eval eventtime3 = mvindex(eventtimes,2)
| eval eventtime4 = mvindex(eventtimes,3)
| eval eventtime5 = mvindex(eventtimes,4)
| table flowKey eventsize1 eventtime1 eventsize2 eventtime2 eventsize3 eventtime3 eventsize4 eventtime4 eventsize5 eventtime5 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But as you can see, that gets very ugly if the range of possible number of 'columns' can be much bigger.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 09:11:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-split-a-multivalue-json/m-p/378098#M68395</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-03T09:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk to split a multivalue json</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-split-a-multivalue-json/m-p/378099#M68396</link>
      <description>&lt;P&gt;Hi FrankVI&lt;/P&gt;

&lt;P&gt;I swore I tried something like your solution but I cannot hack it. &lt;BR /&gt;
Maybe I am starting to see stars and commas. &lt;/P&gt;

&lt;P&gt;Thanks for your speedy help! Really works! &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 09:20:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-split-a-multivalue-json/m-p/378099#M68396</guid>
      <dc:creator>sssignals</dc:creator>
      <dc:date>2019-07-03T09:20:54Z</dc:date>
    </item>
  </channel>
</rss>

