Splunk Search

Fetch fields in json

tsm0099
Explorer

I hava data in statistics.. it has the below format:

 

START Request Id: 62529168377 :$LATEST

{"Name": "abc","Alarm":"alarm from console" , "Trigger":{"Mname":"pqr", "Dimensions":[{"value": "xyz", "name": "efg"},{"value":"hji","value":"lkh"}] } }

 

I have to fetch the values inside the Dimensions.

How can i i achieve this?

 

Thanks in advance.

Labels (4)
0 Karma

renjith_nair
Legend

Have you tried spath ? 

E.g.

|makeresults|eval json="{
   \"Name\": \"abc\",
   \"Alarm\": \"alarm from console\",
   \"Trigger\": {
      \"Mname\": \"pqr\",
      \"Dimensions\": [
         {
            \"value\": \"xyz\",
            \"name\": \"efg\"
         },
         {
            \"value\": [
               \"hji\",
               \"lkh\"
            ]
         }
      ]
   }
}"
|spath input=json

 

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...