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!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...