Splunk Dev

Reading results data from search done handler .on("search:done", function(){}) in SplunkJS

seva98
Path Finder
Hi, 
 
how do I read results of finished Splunk search in Javascript with following function?
 
mvc.Components.get("search_id").on("search:done", function () { })
Labels (1)
0 Karma

niketn
Legend

@seva98 refer to one of the older answers https://community.splunk.com/t5/Archive/How-to-retrieve-more-than-100-record-in-searchmanager/td-p/1...

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

seva98
Path Finder

Thanks, just one more question. Is there more convenient way to access results without accessing _data attribute?

searchManager.data('results', {count: 0, output_mode: 'json_rows'}).on('data', function(data) {
// Currently I see data there:

const dataFields = data._data.fields
const dataRows = data._data.rows

});

0 Karma
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...