All Apps and Add-ons

How to extract the data present in curly braces {} in Splunk Search?

zen29d
Explorer

If the data present in json format {[]} get extracted, however when data present in {} as shown below doesn't behave same. How fields and values can be extracted from data in {}

_raw data:

{"AlertEntityId": "abc@domai.com", "AlertId": "21-3-1-2-4--12", "AlertType": "System", "Comments": "New alert", "CreationTime": "2022-06-08T16:52:51", "Data": "{\"etype\":\"User\",\"eid\":\"abc@domai.com\",\"op\":\"UserSubmission\",\"tdc\":\"1\",\"suid\":\"abc@domai.com\",\"ut\":\"Regular\",\"ssic\":\"0\",\"tsd\":\"Jeff Nichols <jeff@Nichols.com>\",\"sip\":\"1.2.3.4\",\"srt\":\"1\",\"trc\":\"abc@domai.com\",\"ms\":\"Grok - AI/ML summary, case study, datasheet\",\"lon\":\"UserSubmission\"}"}

When I perform query "| table Data", I get the below result, But how to get values of "eid", "tsd".

{"etype":"User","eid":"abc@domai.com","op":"UserSubmission","tdc":"1","suid":"abc@domai.com","ut":"Regular","ssic":"0","tsd":"Jeff Nichols <jeff@Nichols.com>","sip":"1.2.3.4","srt":"1","trc":"abc@domai.com","ms":"Grok - AI/ML summary, case study, datasheet","lon":"UserSubmission"}

Labels (2)
Tags (2)
0 Karma

zen29d
Explorer

Requirement is 
Data.eid should give the value "abc@domai.com"
Data.tsd should give the value "Jeff Nichols<jeff@Nichols.com>"

I tried above query with below combination, but none of them give result.
| spath input=Data 
| spath output=sender path=Data.tsd

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| spath input=Data
0 Karma

zen29d
Explorer

Not working.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

In what way?

0 Karma

zen29d
Explorer

Requirement is 
Data.eid should give the value "abc@domai.com"
Data.tsd should give the value "Jeff Nichols<jeff@Nichols.com>"

I tried above query with below combination, but none of them give result.
| spath input=Data 
| spath output=sender path=Data.tsd

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| makeresults
| fields - _time
| eval _raw="{\"AlertEntityId\": \"abc@domai.com\", \"AlertId\": \"21-3-1-2-4--12\", \"AlertType\": \"System\", \"Comments\": \"New alert\", \"CreationTime\": \"2022-06-08T16:52:51\", \"Data\": \"{\\\"etype\\\":\\\"User\\\",\\\"eid\\\":\\\"abc@domai.com\\\",\\\"op\\\":\\\"UserSubmission\\\",\\\"tdc\\\":\\\"1\\\",\\\"suid\\\":\\\"abc@domai.com\\\",\\\"ut\\\":\\\"Regular\\\",\\\"ssic\\\":\\\"0\\\",\\\"tsd\\\":\\\"Jeff Nichols &lt;jeff@Nichols.com&gt;\\\",\\\"sip\\\":\\\"1.2.3.4\\\",\\\"srt\\\":\\\"1\\\",\\\"trc\\\":\\\"abc@domai.com\\\",\\\"ms\\\":\\\"Grok - AI/ML summary, case study, datasheet\\\",\\\"lon\\\":\\\"UserSubmission\\\"}\"}"
| spath
| spath input=Data
| eval tsd=replace(tsd,"&lt;","<")
| eval tsd=replace(tsd,"&gt;",">")

zen29d
Explorer

Thanks for the help.

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...