<?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: Extract Key value data from raw events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555304#M157630</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="\"Headers\" :{\"name\":\"Content-Length\",\"valueList\":[\"94\"]}, [{\"name\":\"Cookie\",\"valueList\":[\"xrm7=-762BMB0; exp-ck=1; CQTEST=1; xTpYacs=; DQ=Y; DX=wsdaquijhs; S_ID=xyat; Latency=1; TB_N=10; TB_SFOU-100=; C_Flag=0; vct_id=9XgVPsnKid7aaiY; bct_id=X89wgVnSdKdiU1gqaa]\"}" 
| rex field=_raw "\[\{\"name\":\"Cookie\",\"valueList\":\[\"(?&amp;lt;coockie_value&amp;gt;[^\]]+)" 
| search coockie_value=* 
| rename coockie_value as _raw 
| extract pairdelim=";" kvdelim="=" 
| stats count(*) as *&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&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, 10 Jun 2021 13:11:56 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2021-06-10T13:11:56Z</dc:date>
    <item>
      <title>Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/554655#M157433</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am trying to pull the data for the below raw events.&lt;/P&gt;&lt;P&gt;{"name":"Content-Length","valueList":["94"]}&lt;BR /&gt;{"name":"Referer","valueList":["&lt;A href="https://www.abc.com/xyz/pageID" target="_blank" rel="noopener"&gt;https://www.abc.com/xyz/pageID&lt;/A&gt;"]}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The end result I am looking for is :&lt;/P&gt;&lt;P&gt;Content-Length :&amp;nbsp; 94&lt;/P&gt;&lt;P&gt;Referer : /xyz/pageID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure if this is really possible to pull make a value to a key pair.&amp;nbsp; Still trying to understand the regex but no luck. if someone could please give a hint or help on how to work with this.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 10:42:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/554655#M157433</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-07T10:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/554662#M157436</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH | rename valueList{} as value | table name value | eval result=name.": ".value&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="markup"&gt;| makeresults | eval raw="{\"name\":\"Content-Length\",\"valueList\":[\"94\"]}|{\"name\":\"Referer\",\"valueList\":[\"https://www.abc.com/xyz/pageID\"]}",raw=split(raw,"|")| mvexpand raw| rename raw  as _raw | extract | rename valueList{} as value | table name value | eval result=name.": ".value&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-06-07 at 4.40.31 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14501i513D1222BB10744F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2021-06-07 at 4.40.31 PM.png" alt="Screenshot 2021-06-07 at 4.40.31 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; Thanks&lt;BR /&gt;KV&lt;BR /&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>Mon, 07 Jun 2021 11:10:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/554662#M157436</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-07T11:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/554936#M157503</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp; for the response. The problem is the events are very dense and each field has it's own nested key value pairs. So I am not sure how to pull this data.&lt;BR /&gt;&lt;BR /&gt;"Header"&lt;SPAN class="t"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;[{&lt;/SPAN&gt;&lt;SPAN&gt;"name":"Content-Length","valueList":["94"]},{"name":"Referer","valueList":["&lt;A href="https://www.abc.com/xyz/pageID" target="_blank" rel="noopener nofollow noreferrer"&gt;https://www.abc.com/xyz/pageID&lt;/A&gt;"]},{"name":"User-Agent","valueList":["Androidv11"]}.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;like this the entire events consist of name and valueList. I am not sure how to remove this from their raw events.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 16:07:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/554936#M157503</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-08T16:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/554944#M157506</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| rex field=_raw "\"Header\":\[(?&amp;lt;raw&amp;gt;.*).$" 
| rex field=raw mode=sed "s/},{/}|{/g"
| eval raw=split(raw,"|")| mvexpand raw| rename raw  as _raw
| extract | rename valueList{} as value | table name value | eval result=name.": ".value&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="markup"&gt;| makeresults 
| eval _raw="\"Header\":[{\"name\":\"Content-Length\",\"valueList\":[\"94\"]},{\"name\":\"Referer\",\"valueList\":[\"https://www.abc.com/xyz/pageID\"]},{\"name\":\"User-Agent\",\"valueList\":[\"Androidv11\"]}." 
| rex field=_raw "\"Header\":\[(?&amp;lt;raw&amp;gt;.*).$" 
| rex field=raw mode=sed "s/},{/}|{/g"
| eval raw=split(raw,"|")| mvexpand raw| rename raw  as _raw
| extract | rename valueList{} as value | table name value | eval result=name.": ".value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample event:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"Header":[{"name":"Content-Length","valueList":["94"]},{"name":"Referer","valueList":["https://www.abc.com/xyz/pageID"]},{"name":"User-Agent","valueList":["Androidv11"]}.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&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>Tue, 08 Jun 2021 17:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/554944#M157506</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-08T17:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555057#M157538</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp; thank you so much for the query. Is it possible to display the table for the "path" and have the "result" column.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;PATH | Result.&lt;/P&gt;&lt;P&gt;like PATH - should contain only single row and Result can have multiple data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 09:42:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555057#M157538</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-09T09:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555059#M157540</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PATH means&amp;nbsp;Referer field?? Can you please share your expected op from your given sample?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 09:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555059#M157540</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-09T09:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555065#M157544</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;&lt;/P&gt;&lt;P&gt;thanks for your query. It was really helpful. I was able to extract the data exactly the way I wanted. Inside that headerlist - we have one more field orderID. I want to use that as one column and the rest of them as the result column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 10:38:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555065#M157544</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-09T10:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555066#M157545</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="\"Header\":[{\"name\":\"orderID\",\"valueList\":[\"101\"]},{\"name\":\"Content-Length\",\"valueList\":[\"94\"]},{\"name\":\"Referer\",\"valueList\":[\"https://www.abc.com/xyz/pageID\"]},{\"name\":\"User-Agent\",\"valueList\":[\"Androidv11\"]}." 
| rex field=_raw "\"Header\":\[(?&amp;lt;raw&amp;gt;.*).$" 
| rex field=raw mode=sed "s/},{/}|{/g"
| eval raw=split(raw,"|") |eval a=1 | accum a| mvexpand raw| rename raw  as _raw
| extract | rename valueList{} as value  | eval result=name.": ".value
| eval orderID = if(name="orderID",value,null())
| stats values(result) as result values(orderID) as orderID by a
| table orderID result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&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>Wed, 09 Jun 2021 11:06:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555066#M157545</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-09T11:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555068#M157547</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;&lt;/P&gt;&lt;P&gt;It's kind of working but not fully. Let's say there are 20000+ events.&lt;/P&gt;&lt;P&gt;Like in a raw events there can be request where the order ID would be same for many of the request.&lt;/P&gt;&lt;P&gt;I will like to pull the logs for specific orderID and the second column would be list of headers with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would look like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;orderID |&amp;nbsp; Result&lt;/P&gt;&lt;P&gt;a123 | content-length, referer, etc&lt;/P&gt;&lt;P&gt;a214 | content-length, referer, accept-language&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 11:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555068#M157547</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-09T11:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555075#M157548</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please share some sample events with OrderId?&lt;/P&gt;&lt;P&gt;KV&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 12:25:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555075#M157548</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-09T12:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555076#M157549</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;&lt;/P&gt;&lt;P&gt;I need to take the count of unique order ID along with result column.&lt;/P&gt;&lt;P&gt;Currently I don't have a sample data with me.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 12:35:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555076#M157549</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-09T12:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555088#M157552</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;&lt;/P&gt;&lt;P&gt;along with the same data. I want to add status code, it is not working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The status code is part of raw events but not in "Headers" it is different field with the name status.&lt;/P&gt;&lt;P&gt;*.... | rex field=_raw "\"Headers\":\[(?&amp;lt;raw&amp;gt;.*).$"&lt;BR /&gt;| rex field=raw mode=sed "s/},{/}|{/g"&lt;BR /&gt;| eval raw=split(raw,"|")| mvexpand raw | rename raw as _raw&lt;BR /&gt;| extract | rename valueList{} as value | table name value | eval result=name.": ".value | eval orderID = if(name="OrderID",value,null())&lt;BR /&gt;| stats count by orderID status&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is not working for me.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 13:11:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555088#M157552</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-09T13:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555114#M157564</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;&lt;/P&gt;&lt;P&gt;Can you put some light on the regex which you have wrote :&lt;/P&gt;&lt;P&gt;| rex field=_raw "\"requestHeaderList\":\[(?&amp;lt;raw&amp;gt;.*).$"&lt;/P&gt;&lt;P&gt;| rex field=raw mode=sed "s/},{/}|{/g"&lt;/P&gt;&lt;P&gt;| eval raw=split(raw,"|")| mvexpand raw | rename raw&amp;nbsp; as _raw&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you can just guide what these query basically doing. It would be really helpful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 15:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555114#M157564</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-09T15:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555123#M157568</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=_raw "\"Header\":\[(?&amp;lt;raw&amp;gt;.*).$" &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This will extract JSON data from _raw event and assign into new field raw.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;From: 

"Header":[{"name":"Content-Length","valueList":["94"]},{"name":"Referer","valueList":["https://www.abc.com/xyz/pageID"]},{"name":"User-Agent","valueList":["Androidv11"]}.

to:

{"name":"Content-Length","valueList":["94"]},{"name":"Referer","valueList":["https://www.abc.com/xyz/pageID"]},{"name":"User-Agent","valueList":["Androidv11"]}&lt;/LI-CODE&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=raw mode=sed "s/},{/}|{/g"&lt;/LI-CODE&gt;&lt;P&gt;This will replace commas between different json with pipe(|). It is required for next operation&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;From:

{"name":"Content-Length","valueList":["94"]},{"name":"Referer","valueList":["https://www.abc.com/xyz/pageID"]},{"name":"User-Agent","valueList":["Androidv11"]}

To:

{"name":"Content-Length","valueList":["94"]}|{"name":"Referer","valueList":["https://www.abc.com/xyz/pageID"]}|{"name":"User-Agent","valueList":["Androidv11"]}&lt;/LI-CODE&gt;&lt;P&gt;--&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval raw=split(raw,"|") |eval a=1 | accum a| mvexpand raw| rename raw  as _raw&lt;/LI-CODE&gt;&lt;P&gt;This will split raw into multiple events and assign into _raw and keep unique value, here it is field a.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;From

{"name":"Content-Length","valueList":["94"]}|{"name":"Referer","valueList":["https://www.abc.com/xyz/pageID"]}|{"name":"User-Agent","valueList":["Androidv11"]}


To:

{"name":"Content-Length","valueList":["94"]}
{"name":"Referer","valueList":["https://www.abc.com/xyz/pageID"]}
{"name":"User-Agent","valueList":["Androidv11"]}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upto now we cab easily access the name and valueList fields to perform next operation&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 16:06:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555123#M157568</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-09T16:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555156#M157578</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=2000 | eval a=1 | accum a
| eval _raw="\"Header\":[{\"name\":\"orderID\",\"valueList\":[\"a".a."\"]},{\"name\":\"Content-Length\",\"valueList\":[\"94\"]},{\"name\":\"Referer\",\"valueList\":[\"https://www.abc.com/xyz/pageID\"]},{\"name\":\"User-Agent\",\"valueList\":[\"Androidv11\"]}." 
| rex field=_raw "\"Header\":\[(?&amp;lt;raw&amp;gt;.*).$" 
| rex field=raw mode=sed "s/},{/}|{/g"
| eval raw=split(raw,"|") |eval a=1 | accum a| mvexpand raw| rename raw  as _raw
| extract | rename valueList{} as value  | eval result=name.": ".value
| eval orderID = if(name="orderID",value,null())
| stats delim="," values(name) as name values(orderID) as orderID by a | nomv name
| table orderID name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&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>Wed, 09 Jun 2021 17:46:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555156#M157578</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-09T17:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555279#M157624</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;&lt;/P&gt;&lt;P&gt;thank you so much Kamlesh. It was worth look into this.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 10:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555279#M157624</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-10T10:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555291#M157626</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;&lt;/P&gt;&lt;P&gt;sorry to bother you again. for the same query&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"name":"Content-Length","valueList":["94"]}&lt;BR /&gt;{"name":"Referer","valueList":["&lt;A href="https://www.abc.com/xyz/pageID" target="_blank" rel="noopener nofollow noreferrer"&gt;https://www.abc.com/xyz/pageID&lt;/A&gt;"]}&lt;BR /&gt;{"name":"Cookie","valueList:[abc=123;s_id=9wefdrtunhfkd6; df_id=xijuhygsdd342;data=helloworld]}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to pull the complete value List for the name Cookie. Based on that I need to run the query&lt;/P&gt;&lt;P&gt;stats count by Cookie - where it display how much was the count of ----&amp;nbsp; abc,&amp;nbsp; s_id, df_id, data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 11:45:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555291#M157626</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-10T11:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555292#M157627</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval raw="{\"name\":\"Content-Length\",\"valueList\":[\"94\"]}|{\"name\":\"Referer\",\"valueList\":[\"https://www.abc.com/xyz/pageID\"]}|{\"name\":\"Cookie\",\"valueList\":[\"abc=123;s_id=9wefdrtunhfkd6; df_id=xijuhygsdd342;data=helloworld\"]}|{\"name\":\"Content-Length\",\"valueList\":[\"94\"]}|{\"name\":\"Referer\",\"valueList\":[\"https://www.abc.com/xyz/pageID]\"}|{\"name\":\"Cookie\",\"valueList\":[\"abc=123;s_id=9wefdrtunhfkd6; df_id=xijuhygsdd342;data=helloworld]\"}", raw=split(raw,"|") 
| mvexpand raw | rename raw as _raw | extract | where name= "Cookie" | rename valueList{} as _raw  | extract | stats count(eval(isnotnull(abc))) as abc, count(eval(isnotnull(s_id))) as s_id, count(eval(isnotnull(df_id))) as df_id, count(eval(isnotnull(data))) as data&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&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, 10 Jun 2021 12:07:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555292#M157627</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-10T12:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555296#M157628</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;&lt;/P&gt;&lt;P&gt;can't we make something in the same regex.&lt;/P&gt;&lt;P&gt;| rex field=_raw "\"Headers\":\[(?&amp;lt;raw&amp;gt;.*).$"&lt;/P&gt;&lt;P&gt;| rex field=raw mode=sed "s/},{/}|{/g"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because the "cookie" field is the part of Headers and it's values are separated with semi colon ;. There are many values under Cookie fields which uses semi colon as separator.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Headers" :{"&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Content-Length&lt;/SPAN&gt;&lt;SPAN&gt;","&lt;/SPAN&gt;&lt;SPAN&gt;valueList&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;["&lt;/SPAN&gt;&lt;SPAN&gt;94&lt;/SPAN&gt;&lt;SPAN&gt;"]},&lt;/SPAN&gt;&lt;SPAN&gt; [{"&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Cookie&lt;/SPAN&gt;&lt;SPAN&gt;","&lt;/SPAN&gt;&lt;SPAN&gt;valueList&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;["&lt;/SPAN&gt;&lt;SPAN&gt;xrm7=-76&lt;/SPAN&gt;&lt;SPAN&gt;2B&lt;/SPAN&gt;&lt;SPAN&gt;M&lt;/SPAN&gt;&lt;SPAN&gt;B&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;exp-ck=1&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;CQTEST=1&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;xTpYacs=&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;DQ=Y&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;DX=wsdaquijhs&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;S_ID=xyat&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;Latency=1&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;TB_N=10&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;TB_SFOU-100=&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;C_Flag=0&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;vct_id=9XgVPsnKid7aaiY&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;bct_id=X89wgVnSdKdiU1gqaa&lt;/SPAN&gt;&lt;SPAN&gt;]},…………….&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 12:51:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555296#M157628</guid>
      <dc:creator>bijodev1</dc:creator>
      <dc:date>2021-06-10T12:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Key value data from raw events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555304#M157630</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235142"&gt;@bijodev1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="\"Headers\" :{\"name\":\"Content-Length\",\"valueList\":[\"94\"]}, [{\"name\":\"Cookie\",\"valueList\":[\"xrm7=-762BMB0; exp-ck=1; CQTEST=1; xTpYacs=; DQ=Y; DX=wsdaquijhs; S_ID=xyat; Latency=1; TB_N=10; TB_SFOU-100=; C_Flag=0; vct_id=9XgVPsnKid7aaiY; bct_id=X89wgVnSdKdiU1gqaa]\"}" 
| rex field=_raw "\[\{\"name\":\"Cookie\",\"valueList\":\[\"(?&amp;lt;coockie_value&amp;gt;[^\]]+)" 
| search coockie_value=* 
| rename coockie_value as _raw 
| extract pairdelim=";" kvdelim="=" 
| stats count(*) as *&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&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, 10 Jun 2021 13:11:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-Key-value-data-from-raw-events/m-p/555304#M157630</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-10T13:11:56Z</dc:date>
    </item>
  </channel>
</rss>

