If I have queries with dictionaries containing events as the key and frequencies as the value:
line.Data = {"eventOne": 4, "eventThree" : 2}; line.Data = {"eventOne": 2, "eventTwo" : 3}
How can I create a table that shows the sum of the different events:
eventOne: 6
eventTwo: 3
eventThree: 2
Here is a runanywhere example showing how you could approach this.
| makeresults
| fields - _time
| eval line.Data = split("{\"eventOne\": 4, \"eventThree\" : 2};{\"eventOne\": 2, \"eventTwo\" : 3}",";")
| mvexpand line.Data
``` the lines above create sample events, one event per line.Data ```
| spath input=line.Data
| untable line.Data event count
| stats sum(count) as count by event
<your base search>
| stats sum(*) as * by _time
| transpose