Splunk Search

How to parse data from JSON?

szrobag
Explorer

Hello,

Help me please. I have a REST API datasource get data ( JSON ) in main index something like this:

["user","domain\\user1","domain\\user2","domain\\user3"] ... 

I'd like to create a search which runs for all the users extracted from this JSON. 

How it is possible to use all this values in another search? 

thanks 

 

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Your example isn't properly formatted JSON - if your real events are properly formatted JSON, you could look at using spath to extract the values.

Get Updates on the Splunk Community!

New Year. New Skills. New Course Releases from Splunk Education

A new year often inspires reflection—and reinvention. Whether your goals include strengthening your security ...

Splunk and TLS: It doesn't have to be too hard

Overview Creating a TLS cert for Splunk usage is pretty much standard openssl.  To make life better, use an ...

Faster Insights with AI, Streamlined Cloud-Native Operations, and More New Lantern ...

Splunk Lantern is a Splunk customer success center that provides practical guidance from Splunk experts on key ...