Splunk Enterprise

How can I (or is it even possible to) make arrays out of a and b?

rberman
Path Finder

Suppose I have data as follows:

| makeresults
| eval a = mvappend(a, "\"1\"")
| eval a = mvappend(a, "\"2\"")
| eval a = mvappend(a, "\"3\"")
| eval a = mvappend(a, "\"4\"")
| eval a = mvappend(a, "\"5\"")
| eval b= mvjoin(a, ",")
| table a, b

Using SPL, how can I (or is it even possible to) make arrays out of a and b so that I have fields c=["1","2","3","4","5"]  and d=["1","2","3","4","5"] where c is an array of 5 quoted numerical values and d is an array of 1 single string of the comma separated string: "1","2","3","4","5"

I know I can get arrays of values via extraction from JSON but is there a way to do this without JSON?

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

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...