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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...