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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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