Splunk Search

json to table

vinod0313
Explorer

Hello 

I have a log like below,which is having JSON object

FEATURES=[
{
"featureName":"TOKEN_VALIDATION",
"addedIn":"1.0.7",
"description":"This feature is used to Validate the JWT token"
},
{
"featureName":"REQUETS_VALIDATION",
"addedIn":"1.0.7",
"description":"This feature is used to Validate request URL"
},
{
"featureName":"REQUEST_PAYLOAD_VALIDATION",
"addedIn":"1.0.7",
"description":"This feature is used to Validate request body"
},
{
"featureName":"RESPONSE_PAYLOAD_VALIDATION",
"addedIn":"1.0.7",
"description":"This feature is used to Validate response body"
},
{
"featureName":"AOP",
"addedIn":"1.0.6",
"description":"This feature is used to check method execution time"
},
{
"featureName":"TIBCO_COMMUNICATOR",
"addedIn":"1.0.8",
"description":"This feature is used to connect Benefits service "
},
{
"featureName":"SECRETS_SECURE",
"addedIn":"1.0.7",
"description":"This feature is used to Validate"
}
]



I want the out put table should be as shown in below

featureName                                                 addedIn                             description

TOKEN_VALIDATION                                      1.0.7                           This feature is used to Validate the JWT token
REQUETS_VALIDATION                                 1.0.7                           This feature is used to Validate request URL
REQUEST_PAYLOAD_VALIDATION           1.0.7                           This feature is used to Validate request body
RESPONSE_PAYLOAD_VALIDATION        1.0.7                           This feature is used to Validate response body
AOP                                                                        1.0.6                    This feature is used to check method execution time
TIBCO_COMMUNICATOR                             1.0.8                     This feature is used to connect Benefits service
SECRETS_SECURE                                          1.0.7                      This feature is used to Validate SECRETS





Labels (1)
0 Karma
1 Solution

to4kawa
Ultra Champion

index=_internal | head 1 | fields _raw | eval FEATURES="[{\"featureName\":\"TOKEN_VALIDATION\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate the JWT token\"},{\"featureName\":\"REQUETS_VALIDATION\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate request URL\"},{\"featureName\":\"REQUEST_PAYLOAD_VALIDATION\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate request body\"},{\"featureName\":\"RESPONSE_PAYLOAD_VALIDATION\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate response body\"},{\"featureName\":\"AOP\",\"addedIn\":\"1.0.6\",\"description\":\"This feature is used to check method execution time\"},{\"featureName\":\"TIBCO_COMMUNICATOR\",\"addedIn\":\"1.0.8\",\"description\":\"This feature is used to connect Benefits service \"},{\"featureName\":\"SECRETS_SECURE\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate\"}]"
| spath input=FEATURES {} output=raw
| stats count by raw
| spath input=raw
| table featureName,addedIn,description

View solution in original post

0 Karma

to4kawa
Ultra Champion

index=_internal | head 1 | fields _raw | eval FEATURES="[{\"featureName\":\"TOKEN_VALIDATION\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate the JWT token\"},{\"featureName\":\"REQUETS_VALIDATION\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate request URL\"},{\"featureName\":\"REQUEST_PAYLOAD_VALIDATION\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate request body\"},{\"featureName\":\"RESPONSE_PAYLOAD_VALIDATION\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate response body\"},{\"featureName\":\"AOP\",\"addedIn\":\"1.0.6\",\"description\":\"This feature is used to check method execution time\"},{\"featureName\":\"TIBCO_COMMUNICATOR\",\"addedIn\":\"1.0.8\",\"description\":\"This feature is used to connect Benefits service \"},{\"featureName\":\"SECRETS_SECURE\",\"addedIn\":\"1.0.7\",\"description\":\"This feature is used to Validate\"}]"
| spath input=FEATURES {} output=raw
| stats count by raw
| spath input=raw
| table featureName,addedIn,description

0 Karma

vinod0313
Explorer

I am getting result as shown below

vinod0313_0-1598271544539.png



i am getting the order in alphabetical order.

if it come as in json object order,I mean Token_validation is first,Request_validation second so on.

But thanks for the solution

0 Karma

to4kawa
Ultra Champion

| stats count by raw → | mvexpand raw

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

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

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...