Forum Discussion
Kusto Query Language: Ep.9 – Parsing Complex Data Types.
Hey, you're pretty close.
Try using `parse_xml` on the EventData, as it's in XML format and not JSON.
Then you can summarize the attribute directly like: `summarize avg(todatetime(EventData.DataItem["@time"]))`
- CalumS3 months ago
Bronze III
Hey, thank for the help, got me a bit of the way there.
Ended up working with the following:
Event_CL
| extend ParsedXml = parse_xml(EventData)
| where tostring(ParsedXml) contains "KB2267602"
| summarize avg_time = avg(todatetime(ParsedXml.DataItem["@time"]))But got a value and put it in to be incorrect, did attempt a few variations of it incase it wanted in a certain format.
- SamDickison2 months ago
Community Manager
Hi CalumS did you manage to completed the lab?
- CalumS2 months ago
Bronze III
Hi SamDickison Not managed to yet with the help above or had time to get back and try again. Will do soon hopefully and get back to you.