<?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: How to use mvindex to break json file with multiple values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565593#M197064</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/29190"&gt;@rczone&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks some variations in JSON event.&lt;/P&gt;&lt;P&gt;Can you please try these two options?&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| spath path=results_appcodes{} output=results_appcodes 
| stats count by results_appcodes |fields - count 
| rename results_appcodes as _raw 
| kv 
| eval job_names=if(isnotnull('job_names{}'),'job_names{}','job_names{}{}') 
| fields - "job_names{*"
|table app_code count group instance job_names | eval job_names=mvjoin(job_names,",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{\"results_appcodes\": [{\"count\": 2,\"app_code\": \"XYZ\",\"group\": \"\",\"instance\": \"PQ1\",\"job_names\": [\"XYZ#cmd#johntest1\", \"XYZ#cmd#remetest\"]}, {\"count\": 2,\"app_code\": \"ZZZ\",\"group\": \"ABC1234\",\"instance\": \"PQ1\",\"job_names\": [\"ZZZ#ADM#cmd#pac\", \"ZZZ#cmd#GET_APP_CODE\"]}, {\"count\": 1,\"app_code\": \"XYZ\",\"group\": \"\",\"instance\": \"PQ1\",\"job_names\": [\"XYZ#cmd#mila3098\"]}, {\"count\": 192,\"app_code\": \"GKU\",\"group\": \"CAD45678\",\"instance\": \"PQ1\",\"job_names\": [[\"ZZZ#cmd#test123\"],[\"ZZZ#cmd#test890\"],[\"ZZZ#cmd#gola456\"],[\"ZZZ#cmd#test9990\"]]}]}" 
| kv 
| spath path=results_appcodes{} output=results_appcodes 
| stats count by results_appcodes |fields - count 
| rename results_appcodes as _raw 
| kv 
| eval job_names=if(isnotnull('job_names{}'),'job_names{}','job_names{}{}') 
| fields - "job_names{*"
|table app_code count group instance job_names | eval job_names=mvjoin(job_names,",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| eval data = split(_raw,"}, {") | stats count by data
| rex field=data "\"count\":\s(?&amp;lt;count&amp;gt;\d+),\s\"app_code\":\s\"(?&amp;lt;app_code&amp;gt;[^,]+)\",\s\"group\"\:\s\"(?&amp;lt;group&amp;gt;[^,]*)\",\s\"instance\"\:\s\"(?&amp;lt;instance&amp;gt;[^,]+)\",\s\"job_names\":\s(?&amp;lt;job_names&amp;gt;.*)"
| rex field=job_names "\[?\"(?&amp;lt;job_names&amp;gt;[^\"]+)\""  max_match=0 | eval job_names=mvjoin(job_names,",")
|table app_code	count group instance job_names&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{\"results_appcodes\": [{\"count\": 2, \"app_code\": \"XYZ\", \"group\": \"\", \"instance\": \"PQ1\", \"job_names\": [\"XYZ#cmd#johntest1\", \"XYZ#cmd#remetest\"]}, {\"count\": 2, \"app_code\": \"ZZZ\", \"group\": \"ABC1234\", \"instance\": \"PQ1\", \"job_names\": [\"ZZZ#ADM#cmd#pac\", \"ZZZ#cmd#GET_APP_CODE\"]}, {\"count\": 1, \"app_code\": \"XYZ\", \"group\": \"\", \"instance\": \"PQ1\", \"job_names\": [\"XYZ#cmd#mila3098\"]}, {\"count\": 192, \"app_code\": \"GKU\", \"group\": \"CAD45678\", \"instance\": \"PQ1\", \"job_names\": [\"ZZZ#cmd#test123\"] ,[\"ZZZ#cmd#test890\"], [\"ZZZ#cmd#gola456\"], [\"ZZZ#cmd#test9990\"] }}"
| eval data = split(_raw,"}, {") | stats count by data
| rex field=data "\"count\":\s(?&amp;lt;count&amp;gt;\d+),\s\"app_code\":\s\"(?&amp;lt;app_code&amp;gt;[^,]+)\",\s\"group\"\:\s\"(?&amp;lt;group&amp;gt;[^,]*)\",\s\"instance\"\:\s\"(?&amp;lt;instance&amp;gt;[^,]+)\",\s\"job_names\":\s(?&amp;lt;job_names&amp;gt;.*)"
| rex field=job_names "\[?\"(?&amp;lt;job_names&amp;gt;[^\"]+)\""  max_match=0 | eval job_names=mvjoin(job_names,",")
|table app_code	count group instance job_names&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this will help you with your all type of events. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一 &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Sep 2021 05:42:09 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2021-09-02T05:42:09Z</dc:date>
    <item>
      <title>How to use mvindex to break json file with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565258#M196933</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i have a field like below with JSON file&lt;BR /&gt;&lt;BR /&gt;&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;{"results_appcodes": [{"count": 2, "app_code": "XYZ", "group": "", "instance": "PQ1", "job_names": ["XYZ#cmd#johntest1", "XYZ#cmd#remetest"]}, {"count": 2, "app_code": "ZZZ", "group": "ABC1234", "instance": "PQ1", "job_names": ["ZZZ#ADM#cmd#pac", "ZZZ#cmd#GET_APP_CODE"]}, {"count": 1, "app_code": "ZZZ", "group": "", "instance": "PQ1", "job_names": ["ZZZ#cmd#mila3098"]}, {"count": 192, "app_code": "GKU", "group": "CAD45678", "instance": "PQ1", "job_names": ["ZZZ#cmd#test123"] ,["ZZZ#cmd#test890"], ["ZZZ#cmd#gola456"], ["ZZZ#cmd#test9990"] }}&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;&amp;nbsp;Im using below query to break down the JSON file above&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;All the fields&amp;nbsp; count,app_code, group, instance are getting as expected but for&amp;nbsp; job_names&amp;nbsp; im unable to break down and that particular attrbute has a list of jobs underneath it&lt;BR /&gt;&lt;BR /&gt;Im looking for a query to get jobnames also&amp;nbsp;&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;&amp;lt;&amp;lt;mysearch&amp;gt;&amp;gt;| spath input=results|rename unique_appcodes{}.* as *  | eval x = mvzip(count,mvzip(app_code,mvzip(group,mvzip(instance,mvzip(instance,job_names))))) | mvexpand x | eval x = split(x, ",")| eval job_count=mvindex(x,0), app_code = mvindex(x,1) ,group=mvindex(x,2), instance = mvindex(x,3),job_names = mvindex(x,4) |table app_code job_count group instance job_names&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output&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="css"&gt;app_code  count	    group	instance	job_names
XYZ	    2	                 PQ1  	XYZ#cmd#johntest1,XYZ#cmd#remetest
ZZZ	    2       ABC1234	   PQ2	ZZZ#ADM#cmd#pac,ZZZ#cmd#GET_APP_CODE&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;&amp;nbsp;&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;</description>
      <pubDate>Mon, 30 Aug 2021 19:53:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565258#M196933</guid>
      <dc:creator>rczone</dc:creator>
      <dc:date>2021-08-30T19:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use mvindex to break json file with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565259#M196934</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; any inputs&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 20:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565259#M196934</guid>
      <dc:creator>rczone</dc:creator>
      <dc:date>2021-08-30T20:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use mvindex to break json file with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565293#M196950</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath result_appcodes{} output=result_appcodes
| mvexpand result_appcodes 
| spath input=result_appcodes &lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 31 Aug 2021 08:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565293#M196950</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-31T08:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use mvindex to break json file with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565335#M196967</link>
      <description>&lt;P&gt;Thankyou...but im looking to split the values individually as i need them to use further in my query...with jso spath split we cant use the values as individually&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 13:44:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565335#M196967</guid>
      <dc:creator>rczone</dc:creator>
      <dc:date>2021-08-31T13:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to use mvindex to break json file with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565417#M197002</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/29190"&gt;@rczone&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="php"&gt;YOUR_SEARCH 
| kv 
| spath path=results_appcodes{} output=results_appcodes 
| stats count by results_appcodes |fields - count 
| rename results_appcodes as _raw 
| kv 
| eval job_names=if(isnotnull('job_names{}'),'job_names{}','job_names{}{}') 
| fields - "job_names{*"
| eval n=1 | accum n | eventstats max(n) as mn by app_code
| where  n=mn
|table app_code	count group instance job_names | eval job_names=mvjoin(job_names,",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;| makeresults 
| eval _raw="{\"results_appcodes\": [{\"count\": 2,\"app_code\": \"XYZ\",\"group\": \"\",\"instance\": \"PQ1\",\"job_names\": [\"XYZ#cmd#johntest1\", \"XYZ#cmd#remetest\"]}, {\"count\": 2,\"app_code\": \"ZZZ\",\"group\": \"ABC1234\",\"instance\": \"PQ1\",\"job_names\": [\"ZZZ#ADM#cmd#pac\", \"ZZZ#cmd#GET_APP_CODE\"]}, {\"count\": 1,\"app_code\": \"ZZZ\",\"group\": \"\",\"instance\": \"PQ1\",\"job_names\": [\"ZZZ#cmd#mila3098\"]}, {\"count\": 192,\"app_code\": \"GKU\",\"group\": \"CAD45678\",\"instance\": \"PQ1\",\"job_names\": [[\"ZZZ#cmd#test123\"],[\"ZZZ#cmd#test890\"],[\"ZZZ#cmd#gola456\"],[\"ZZZ#cmd#test9990\"]]}]}" 
| kv 
| spath path=results_appcodes{} output=results_appcodes 
| stats count by results_appcodes |fields - count 
| rename results_appcodes as _raw 
| kv 
| eval job_names=if(isnotnull('job_names{}'),'job_names{}','job_names{}{}') 
| fields - "job_names{*"
| eval n=1 | accum n | eventstats max(n) as mn by app_code
| where  n=mn
|table app_code	count group instance job_names | eval job_names=mvjoin(job_names,",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Sample Event.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
	"results_appcodes": [{
		"count": 2,
		"app_code": "XYZ",
		"group": "",
		"instance": "PQ1",
		"job_names": ["XYZ#cmd#johntest1", "XYZ#cmd#remetest"]
	}, {
		"count": 2,
		"app_code": "ZZZ",
		"group": "ABC1234",
		"instance": "PQ1",
		"job_names": ["ZZZ#ADM#cmd#pac", "ZZZ#cmd#GET_APP_CODE"]
	}, {
		"count": 1,
		"app_code": "ZZZ",
		"group": "",
		"instance": "PQ1",
		"job_names": ["ZZZ#cmd#mila3098"]
	}, {
		"count": 192,
		"app_code": "GKU",
		"group": "CAD45678",
		"instance": "PQ1",
		"job_names": [
			["ZZZ#cmd#test123"],
			["ZZZ#cmd#test890"],
			["ZZZ#cmd#gola456"],
			["ZZZ#cmd#test9990"]
		]
	}]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can changes the search incase variation in event &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一 &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 05:32:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565417#M197002</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-09-01T05:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use mvindex to break json file with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565429#M197007</link>
      <description>&lt;P&gt;Can you give an example of what you get from this search and what further it needs to do?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 08:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565429#M197007</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-09-01T08:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use mvindex to break json file with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565547#M197053</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp; Thankyou so much it worked most of the part for me its truncating job_names with count 1 if the job_names is duplicate&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;here is my sample json file -- XYZ job_names has 2 records&amp;nbsp; i it ,with count 2 and count 1 respectively in this case XYZ is only displayed once in output but i have to get 2 rows for XYZ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"results_appcodes": [{"count": 2, "app_code": "XYZ", "group": "", "instance": "PQ1", "job_names": ["XYZ#cmd#johntest1", "XYZ#cmd#remetest"]}, {"count": 2, "app_code": "ZZZ", "group": "ABC1234", "instance": "PQ1", "job_names": ["ZZZ#ADM#cmd#pac", "ZZZ#cmd#GET_APP_CODE"]}, {"count": 1, "app_code": "XYZ", "group": "", "instance": "PQ1", "job_names": ["XYZ#cmd#mila3098"]}, {"count": 192, "app_code": "GKU", "group": "CAD45678", "instance": "PQ1", "job_names": ["ZZZ#cmd#test123"] ,["ZZZ#cmd#test890"], ["ZZZ#cmd#gola456"], ["ZZZ#cmd#test9990"] }}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 19:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565547#M197053</guid>
      <dc:creator>rczone</dc:creator>
      <dc:date>2021-09-01T19:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to use mvindex to break json file with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565593#M197064</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/29190"&gt;@rczone&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks some variations in JSON event.&lt;/P&gt;&lt;P&gt;Can you please try these two options?&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| spath path=results_appcodes{} output=results_appcodes 
| stats count by results_appcodes |fields - count 
| rename results_appcodes as _raw 
| kv 
| eval job_names=if(isnotnull('job_names{}'),'job_names{}','job_names{}{}') 
| fields - "job_names{*"
|table app_code count group instance job_names | eval job_names=mvjoin(job_names,",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{\"results_appcodes\": [{\"count\": 2,\"app_code\": \"XYZ\",\"group\": \"\",\"instance\": \"PQ1\",\"job_names\": [\"XYZ#cmd#johntest1\", \"XYZ#cmd#remetest\"]}, {\"count\": 2,\"app_code\": \"ZZZ\",\"group\": \"ABC1234\",\"instance\": \"PQ1\",\"job_names\": [\"ZZZ#ADM#cmd#pac\", \"ZZZ#cmd#GET_APP_CODE\"]}, {\"count\": 1,\"app_code\": \"XYZ\",\"group\": \"\",\"instance\": \"PQ1\",\"job_names\": [\"XYZ#cmd#mila3098\"]}, {\"count\": 192,\"app_code\": \"GKU\",\"group\": \"CAD45678\",\"instance\": \"PQ1\",\"job_names\": [[\"ZZZ#cmd#test123\"],[\"ZZZ#cmd#test890\"],[\"ZZZ#cmd#gola456\"],[\"ZZZ#cmd#test9990\"]]}]}" 
| kv 
| spath path=results_appcodes{} output=results_appcodes 
| stats count by results_appcodes |fields - count 
| rename results_appcodes as _raw 
| kv 
| eval job_names=if(isnotnull('job_names{}'),'job_names{}','job_names{}{}') 
| fields - "job_names{*"
|table app_code count group instance job_names | eval job_names=mvjoin(job_names,",")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| eval data = split(_raw,"}, {") | stats count by data
| rex field=data "\"count\":\s(?&amp;lt;count&amp;gt;\d+),\s\"app_code\":\s\"(?&amp;lt;app_code&amp;gt;[^,]+)\",\s\"group\"\:\s\"(?&amp;lt;group&amp;gt;[^,]*)\",\s\"instance\"\:\s\"(?&amp;lt;instance&amp;gt;[^,]+)\",\s\"job_names\":\s(?&amp;lt;job_names&amp;gt;.*)"
| rex field=job_names "\[?\"(?&amp;lt;job_names&amp;gt;[^\"]+)\""  max_match=0 | eval job_names=mvjoin(job_names,",")
|table app_code	count group instance job_names&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{\"results_appcodes\": [{\"count\": 2, \"app_code\": \"XYZ\", \"group\": \"\", \"instance\": \"PQ1\", \"job_names\": [\"XYZ#cmd#johntest1\", \"XYZ#cmd#remetest\"]}, {\"count\": 2, \"app_code\": \"ZZZ\", \"group\": \"ABC1234\", \"instance\": \"PQ1\", \"job_names\": [\"ZZZ#ADM#cmd#pac\", \"ZZZ#cmd#GET_APP_CODE\"]}, {\"count\": 1, \"app_code\": \"XYZ\", \"group\": \"\", \"instance\": \"PQ1\", \"job_names\": [\"XYZ#cmd#mila3098\"]}, {\"count\": 192, \"app_code\": \"GKU\", \"group\": \"CAD45678\", \"instance\": \"PQ1\", \"job_names\": [\"ZZZ#cmd#test123\"] ,[\"ZZZ#cmd#test890\"], [\"ZZZ#cmd#gola456\"], [\"ZZZ#cmd#test9990\"] }}"
| eval data = split(_raw,"}, {") | stats count by data
| rex field=data "\"count\":\s(?&amp;lt;count&amp;gt;\d+),\s\"app_code\":\s\"(?&amp;lt;app_code&amp;gt;[^,]+)\",\s\"group\"\:\s\"(?&amp;lt;group&amp;gt;[^,]*)\",\s\"instance\"\:\s\"(?&amp;lt;instance&amp;gt;[^,]+)\",\s\"job_names\":\s(?&amp;lt;job_names&amp;gt;.*)"
| rex field=job_names "\[?\"(?&amp;lt;job_names&amp;gt;[^\"]+)\""  max_match=0 | eval job_names=mvjoin(job_names,",")
|table app_code	count group instance job_names&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this will help you with your all type of events. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一 &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 05:42:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-mvindex-to-break-json-file-with-multiple-values/m-p/565593#M197064</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-09-02T05:42:09Z</dc:date>
    </item>
  </channel>
</rss>

