Splunk Search

How can I use the chart to show top 100 of a json list?

LMN007
Engager

I have a json list like this:

package: [{duration: 100, name: a}, {duration: 90, name: b} ...]

and I want to show the top 100 durations of the package list in the chart. What is the search command? Would you help me, please? 

Labels (4)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| spath path=package{} output=package
| mvexpand package
| spath input=package
| sort 100 -duration
| table name duration

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| spath path=package{} output=package
| mvexpand package
| spath input=package
| sort 100 -duration
| table name duration

LMN007
Engager

Thank you! 

0 Karma
Get Updates on the Splunk Community!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...