-
-
Save sduff/a33410b0311b302601e12148df37c8f7 to your computer and use it in GitHub Desktop.
Splunk Custom Visualisation code to convert data.fields and data.rows into a hash map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data.rows.map(function (row) { | |
var _row = {}; | |
for (var f=0; f<data.fields.length; f++) { | |
fn = data.fields[f].name; | |
_row[fn] = row[f]; | |
} | |
return(_row); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment