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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...