Splunk Search

How to extract a key and value from the json data?

hrs2019
Path Finder

Hi all, I am not able to extract the below-given value from the JSON file
fields are

"initiator": test_abce,
"releasenumber":0.0.11,
"source": "test420",
"deployenv": testppt,
"ServiceMD": app
"ServiceManager": app1
"ServiceLead": app2

Ialt text

I am attaching the screenshot for more information there is space i thing that is causing the issue i tried to add the field name also in my query like source name......... releasenumber source |table releasenumber source deployenv ServiceMD ServiceManager

Am not able to list the data which all are in yellow color

JSON File.
{
"Pirid" : 7965,
"url": "https://connects.test.com/home",

"id": 88,
"level": "202",
"guideline": "2.4",
"help": {
"description": "testid"
},
"pagestest1" : 0,
"pagestest2": 0,
"pagestest3": 1,
"principle": 2,
"severity": "review",
"success_criterion": "2.4.10",
"initiator": test_abce,
"releasenumber":0.0.11,
"source": "test420",
"deployenv": testppt,
"ServiceMD": app
"ServiceManager": app1
"ServiceLead": app2
"success_criterion_title": "Section",
"more_details": "https://api.test",
"ApplicationNm": "Connects",
"_links": {
"pages": {
"href": "https://api/pages"
},
"progress": {
"history": {
"pages": "https://api./history"
}
}
}
}

Labels (2)
0 Karma

reed_kelly
Contributor

Did you try putting all values in quotes. Also some values are missing the subsequent comma ",". Can you fix the input data to be more like this?

"initiator": "test_abce",
"releasenumber":"0.0.11",
"source": "test420",
"deployenv": "testppt",
"ServiceMD": "app",
"ServiceManager": "app1",
"ServiceLead": "app2",
0 Karma

hrs2019
Path Finder

@reed.kelly Thanks for your help

Actually the data is already index in Splunk and I can't modify the JSON file.
I want to use the existing data and try to fetch the filed name with that output.
is there is any way?
I can list the data till "success_criterion" but after that, I can't

0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...