samples | abcdxyz | efghxyz | ijklxyz | mnopxyz |
"transaction" : | ||||
"sampleCount" | ||||
"errorCount" | ||||
"errorPct" | ||||
"meanResTime" | ||||
"medianResTime" | ||||
"minResTime" | ||||
"maxResTime" | ||||
"pct1ResTime" | ||||
"pct2ResTime" | ||||
"pct3ResTime" | ||||
"throughput" | ||||
"receivedKBytesPerSec" | ||||
"sentKBytesPerSec" |
Hi @yuvaraj_m91
Try the following:
| table _raw
| eval parent_keys=json_array_to_mv(json_keys(_raw))
| mvexpand parent_keys
| eval _raw=json_extract(_raw, parent_keys)
| eval child_keys=json_keys(item)
| spath
| fields - _*
| transpose 0 header_field=parent_keys
🌟 Did this answer help you? If so, please consider:
Your feedback encourages the volunteers in this community to continue contributing
Assuming that this is an accurate representation of your data, you could try something like this
| eval array=json_array_to_mv(json_keys(_raw),false())
| foreach array mode=multivalue
[| eval set=mvappend(set,json_extract(_raw,<<ITEM>>))]
| eval row=mvrange(0,mvcount(array))
| mvexpand row
| eval key=mvindex(array,row)
| eval fields=mvindex(set,row)
| table key fields
| fromjson fields
| fields - fields
| transpose 0 header_field=key column_name=samples