(Update) Use to_json with transpose. | eval sha256 = sha256(_raw)
| transpose 0 header_field=sha256
| search column=_raw
| fields - column
| tojson default_type=json
| fields _raw Your sample...
See more...
(Update) Use to_json with transpose. | eval sha256 = sha256(_raw)
| transpose 0 header_field=sha256
| search column=_raw
| fields - column
| tojson default_type=json
| fields _raw Your sample data thus give _raw {"13a485b005f3ef9af9d1e9326223f5f86d60ff1d9677d0f5e4749f91ad650227":{"key1":"val1","key2":"val2"},"b92a2ad0ea51aa55a9b298a752a6de0997c96324b3c4e74ec8d4876af490d67a":{"key1":"val1a","key2":"val2a"}} I think this is closer to what you ask. Another method (initial attempt): Use json_set in foreach. Assuming the "event" you described is _raw. (Works the same if they are in a different field such as "event". Just replace _raw with "event".) | stats values(_raw) as event
| eval consolidated = json_object()
| foreach event mode=multivalue
[eval consolidated = json_set(consolidated, sha256(<<ITEM>>), <<ITEM>>)] Your sample events will give event consolidated { "key1": "val1", "key2":"val2"} { "key1": "val1a", "key2":"val2a"} {"13a485b005f3ef9af9d1e9326223f5f86d60ff1d9677d0f5e4749f91ad650227":"{ \"key1\": \"val1\", \"key2\":\"val2\"}","b92a2ad0ea51aa55a9b298a752a6de0997c96324b3c4e74ec8d4876af490d67a":"{ \"key1\": \"val1a\", \"key2\":\"val2a\"}"} Drawback; This produces an embedded JSON string (as opposed to a JSON object) as value of sha256. Here is an emulation you can play with and compare with real data | makeresults
| eval data = mvappend("{ \"key1\": \"val1\", \"key2\":\"val2\"}",
"{ \"key1\": \"val1a\", \"key2\":\"val2a\"}")
| mvexpand data
| rename data AS _raw
``` data emulation above ```