Splunk Search

Splunk Json extraction - single and multiple items in fields.

MrPink99
New Member

Hi,

New to splunk first time lister. Hoping for some help.

I am trying to extract nested JSON data from a Widows Event log message in splunk. This works (up to a point):

index="someindex" host="Ahost1" | spath input=Message

Its great, except one the of the Json fields is called 'JSON_ArrayUsers' containing UPNs of users. Sometimes it contains a single user, sometimes more than one user.

When more than one user Splunk calls the field this:

JSON_ArrayUsers{}

and when just a single user is listed it names the field this:

JSON_ArrayUsers

This makes searching the field difficult as its called two different things. Its there an easy way to stop the {} appearing - i already know its an array!

Thanks,

Pete

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...