Getting Data In

How do you extract JSON logs that have value =?

rakeshksingh
New Member

Hi All,

I am looking for a field extraction at that time at indexing for JSON file format.

{"field1": "a=\"1", b=\"\",c=\"\",d=\"4", "field2": "x=\"a",y=\"\", "field3": "value3",}

getting logs in Splunk as below

field1 =a="1", b="",c="",d="4"
field2=x="a",y=" "

But, Looking for key value pair for a,b,c,d,x,y in the form of fieldname and fieldvalue.
a=1
d=4
x=a
Tried with spath,xmlkv, but no luck.

Could you please help me out in this.

Thanks in advance

0 Karma

valiquet
Contributor

SED-alter=s/=\\"/:\\"/

0 Karma

rakeshksingh
New Member

its not working.

Could you please suggest any other way ?

0 Karma
Get Updates on the Splunk Community!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...