Dashboards & Visualizations

Extract json array to tabular format with their values

nithys
Communicator

Hi 

I have an event which has prod and test based on env...if it is test it goes to nsps [{},{} ] object an check for the name say A,B,C,D an get their associate  ReadOnlyConsumerNames in tabular format

Output as:

Name      ReadOnlyConsumerNames 
A               Application, Lst,data

B               Application, Lst

C             Lst

D            Lst,Gt,PT

 

 

 

{ [-]

   prod: { []

   }

   test: { [-]

     DistinctAdminConsumers: [ [-]

       App

       pd.

     ]

     DistinctAdminUser: 2

     DistinctReadConsumers: [ [-]

       Application.

       GT.

       Technology.

       data

     ]

     DistinctReadUser: 4

     TotalAdminUser: 20

     TotalNSPCount: 10

     TotalReadUsers: 13

     nsps: [ [-]

       { [-]

         AdminConsumerNames: [ [-]

           App.

           pd.

         ]

         AdminUserCount: 2

         Name: A

         ReadOnlyConsumerNames: [ [-]

           Application

           Lst

           data

         ]

         ReadonlyUserCount: 3

       }

       { [-]

         AdminConsumerNames: [ [-]

           App

           Data

         ]

         AdminUserCount: 2

         Name: B

         ReadOnlyConsumerNames: [ [-]

           Application

           Lst

         ]

         ReadonlyUserCount: 3

       }

       { [-]

         AdminConsumerNames: [ [-]

           preprod

           pd

         ]

         AdminUserCount: 2

         Name: C

         ReadOnlyConsumerNames: [ [-]

           Lst

         ]

         ReadonlyUserCount: 1

       }

       { [-]

         AdminConsumerNames: [ [+]

         ]

         AdminUserCount: 2

         Name: D

         ReadOnlyConsumerNames: [ [-]

           Lst

           Gt

           PT

         ]

         ReadonlyUserCount: 1

       }

  

     ]

   }

}

 

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| spath test.nsps{} output=nsps
| mvexpand nsps
| spath input=nsps Name output=Name
| spath input=nsps ReadOnlyConsumerNames{} output=ReadOnlyConsumerNames
| table Name ReadOnlyConsumerNames
0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...