You need to accurately describe your raw data (anonymize as needed) and any relevant characteristics. (As a general rule, always describe data when asking data analytics questions.) Which field name gives you "account"? Based on your description, "account" is NOT the top level path in the JSON data; additionally, this path to "account" is inside an array according to your partial reveal. Is it second level? Third level? Suppose your top level path is "events", i.e., raw data looks like {"events" : [{xxxx},{"GUID":"5561859B8D624FFC8FF0B87219060DC5"}]}
{"events" : [{xxxx},{"GUID":"5561859B8D624FFC8FF0B87219060DC6","account":"verified"}]}
{"events" : [{xxxx},{"GUID":"5561859B8D624FFC8FF0B87219060DC7","account":"unverified"}]}
{"events" : [{xxxx},{"GUID":"5561859B8D624FFC8FF0B87219060DC8","account":"verified"}]}
{"events" : [{xxxx},{"GUID":"5561859B8D624FFC8FF0B87219060DC9"}]} Splunk would have given you flattened field names like events{}.GUID, events{}.account, etc. If you know that every array events{} contains only a single event{}.account, you can just substitute "account" in solutions with event{}.account. But as an array, events{}.account could be multivalued. In that case, you need to make them single-valued first, i.e., | spath path=events{} ``` events{} should be the actual path of that array ```
| mvexpand events{}
| spath input=events{}
| eval account=if(account=="verified","verified","unverified")
| stats count by account Alternatively, use fillnull | spath path=events{} ``` events{} should be the actual path of that array ```
| mvexpand events{}
| spath input=events{}
| fillnull account value="unverified"
| stats count by account If "account" is not second level, or it is not really inside an array as your original description implied, you need to give accurate description of your data.
... View more