Dashboards & Visualizations

Extracting data from the search result model

mikdman
Engager

Is it possible to extract data from the search result model in some fashion?
Referencing this question :https://answers.splunk.com/answers/293431/how-to-get-data-from-search-manager.html

If i have a search manager and extract data from it using the search results model:

     var myResults = search.data("results"); // get the data from that search
     myResults.on("data", function() {
         resultArray = myResults.data().rows;
         // do stuff with the results
     });

is there away to extract out resultArray so i can perform operations on it outside of myResults.on(...)?
Or, is there another method to approaching the matter of getting data in an array format where i don't have to jump through Backbone?

Thanks in advance.

duesser
Path Finder

I have the same issue.. Is there a way? I tried writing into submitted token model inside "on" call but cannot "get" the token on the higher level. On the console I can see that it was indeed writen into the token though.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...