I have a json with the following structure:
{
"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
}
}
]
}
}
I've to create a table with columns : _time, rv, av, wm, an, et, uri_name, response_time, db_time, total_time here is my query that I'm trying to optimize by removing multiple spaths
basic search rv=*, av=*, wm=*, an=*, et=*
| 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
I can't help but think there would be a more optimized way to get the table.
... View more