It appears the board has ate my answer I wrote earlier to prove that multiple eval spaths is faster than using even 1 spath command. I'll try again. Using your original query with your sample here is your search performance on my local machine's splunk install: | makeresults
| eval data="{
\"version\":\"v0.2\",
\"prints\":{
\"urls\":[
{
\"response_time\":256,
\"uri\":{
\"bool\":false,
\"name\":\"abc\"
},
\"Time\":{
\"total\":52,
\"db\":11
}
},
{
\"response_time\":578,
\"uri\":{
\"bool\":false,
\"name\":\"xyz\"
},
\"Time\":{
\"total\":78,
\"db\":13
}
}
]
}
}"
| spath input=data path=prints.urls{} output=urls
| spath input=urls path=response_time output=response_time
| spath input=urls path=uri.name output=uri_name
| spath input=urls path=Time.db output=db_time
| spath input=urls path=Time.total output=total_time
| table _time, rv, av, wm, an, et, uri_name, response_time, db_time, total_time This search has completed and has returned 1 results by scanning 0 events in 0.119 seconds The query I originally proposed: | makeresults
| eval data="{
\"version\":\"v0.2\",
\"prints\":{
\"urls\":[
{
\"response_time\":256,
\"uri\":{
\"bool\":false,
\"name\":\"abc\"
},
\"Time\":{
\"total\":52,
\"db\":11
}
},
{
\"response_time\":578,
\"uri\":{
\"bool\":false,
\"name\":\"xyz\"
},
\"Time\":{
\"total\":78,
\"db\":13
}
}
]
}
}"
| eval response_time=spath(data, "prints.urls{}.response_time"),
uri_name=spath(data, "prints.urls{}.uri.name"),
db_time=spath(data, "prints.urls{}.Time.db"),
total_time=spath(data, "prints.urls{}.Time.total")
| table _time, rv, av, wm, an, et, uri_name, response_time, db_time, total_time This search has completed and has returned 1 results by scanning 0 events in 0.099 seconds The search proposed by @to4kawa | makeresults
| eval _raw="{\"version\":\"v0.2\",\"prints\":{\"urls\":[{\"response_time\":256,\"uri\":{\"bool\":false,\"name\":\"abc\"},\"Time\":{\"total\":52,\"db\":11}},{\"response_time\":578,\"uri\":{\"bool\":false,\"name\":\"xyz\"},\"Time\":{\"total\":78,\"db\":13}}]}}"
| spath prints.urls{} output=urls
| mvexpand urls
| spath input=urls
| rename Time.db as db_time, Time.total as total_time, uri.name as uri_name This search has completed and has returned 2 results by scanning 0 events in 0.244 seconds And if you have a requirement that each url in the url array appears on it's own row in your table here's my modified version with the caveat I posed above about mvexpand being problematic on large data sets: | makeresults
| eval data="{
\"version\":\"v0.2\",
\"prints\":{
\"urls\":[
{
\"response_time\":256,
\"uri\":{
\"bool\":false,
\"name\":\"abc\"
},
\"Time\":{
\"total\":52,
\"db\":11
}
},
{
\"response_time\":578,
\"uri\":{
\"bool\":false,
\"name\":\"xyz\"
},
\"Time\":{
\"total\":78,
\"db\":13
}
}
]
}
}"
| eval urls=spath(data,"prints.urls{}")
| mvexpand urls
| eval response_time=spath(urls, "response_time"),
uri_name=spath(urls, "uri.name"),
db_time=spath(urls, "Time.db"),
total_time=spath(urls, "Time.total")
| table _time, rv, av, wm, an, et, uri_name, response_time, db_time, total_time This search has completed and has returned 2 results by scanning 0 events in 0.113 seconds Ultimately you can see that using a single pipe eval with the spath command on each field you want will produce a more performant query by about 17% to your original query and at 48% improvement compared to the one by @to4kawa.
... View more