<?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: mvzip json array of values in one event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375195#M110239</link>
    <description>&lt;P&gt;&lt;CODE&gt;index=index | spath input=errorMsg path={}.sym output=sym | spath input=errorMsg path={}.code output=code | stats count by sym, code&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jul 2017 01:06:53 GMT</pubDate>
    <dc:creator>exocore123</dc:creator>
    <dc:date>2017-07-05T01:06:53Z</dc:date>
    <item>
      <title>mvzip json array of values in one event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375193#M110237</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;[  
   {  
      "sym":"ee",
      "code":2E1,
   },
   {  
      "sym":"ie",
      "code":2E2,
   }
]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have a field call errorData, when I use &lt;CODE&gt;spath&lt;/CODE&gt; to access the json and do &lt;CODE&gt;stats&lt;/CODE&gt; and &lt;CODE&gt;mvzip(sym,code)&lt;/CODE&gt; function, it splits these events into two different events (but it is still not really what I want). How can I keep it into one event with the contents aggregated.  Sometimes the array also only has 1 element, so it should be viable for that situation too&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sym                     code                       count
ee,ie                 2E1,2E2                       1
ee                      2E2                         1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I do not want the json with single element array to over-count, I mean mistakenly count matching in the multiple elements json.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 21:25:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375193#M110237</guid>
      <dc:creator>exocore123</dc:creator>
      <dc:date>2017-06-30T21:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: mvzip json array of values in one event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375194#M110238</link>
      <description>&lt;P&gt;Can you provide your current full search that you're using?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 21:11:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375194#M110238</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-07-03T21:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: mvzip json array of values in one event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375195#M110239</link>
      <description>&lt;P&gt;&lt;CODE&gt;index=index | spath input=errorMsg path={}.sym output=sym | spath input=errorMsg path={}.code output=code | stats count by sym, code&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 01:06:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375195#M110239</guid>
      <dc:creator>exocore123</dc:creator>
      <dc:date>2017-07-05T01:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: mvzip json array of values in one event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375196#M110240</link>
      <description>&lt;P&gt;Or &lt;CODE&gt;eval msg=mvzip(sym, code) | stats count by msg&lt;/CODE&gt; would get me two events listed instead of 4 like above&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 01:07:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375196#M110240</guid>
      <dc:creator>exocore123</dc:creator>
      <dc:date>2017-07-05T01:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: mvzip json array of values in one event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375197#M110241</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index | spath input=errorMsg path={}.sym output=sym | spath input=errorMsg path={}.code output=code | nomv sym | nomv code | stats count by sym code
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jul 2017 16:51:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375197#M110241</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-07-05T16:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: mvzip json array of values in one event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375198#M110242</link>
      <description>&lt;P&gt;Wow... that was so much easier than I thought, is there a way I can introduce a comma within the space? Using rex or makedelim or join maybe? &lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 19:58:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375198#M110242</guid>
      <dc:creator>exocore123</dc:creator>
      <dc:date>2017-07-05T19:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: mvzip json array of values in one event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375199#M110243</link>
      <description>&lt;P&gt;You can do like this (assuming the value of sym and code do not contain spaces on their own.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;above search
| eval sym=replace(sym," ",", ") | eval code=replace(code," ",", ")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jul 2017 21:44:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mvzip-json-array-of-values-in-one-event/m-p/375199#M110243</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-07-05T21:44:08Z</dc:date>
    </item>
  </channel>
</rss>

