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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...