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!

Monitoring Postgres with OpenTelemetry

Behind every business-critical application, you’ll find databases. These behind-the-scenes stores power ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...