Level 0 · Your toolkit · Card 9 of 9 · by Kaushik Saha
Open nested fields
Commands dot notation · parse_json · mv-expand
What these commands do
| Command | What it does | Shape |
|---|---|---|
dot notation | Reads a field inside a dynamic (JSON) column | Col.field |
parse_json | Turns JSON stored as text into a dynamic value you can read | parse_json(Col) |
mv-expand | Turns a list into one row per item | T | mv-expand Item = ListCol |
Some columns hold a small JSON document instead of one value. LocationDetails holds the city, state and
coordinates of each sign-in.
See them work
The city of each sign-in, read with dot notation:
SigninLogs
| extend City = tostring(LocationDetails.city)
| summarize SignIns = count() by City, Location
Result on the sample · 4 rows
| City | Location | SignIns |
|---|---|---|
| Frankfurt am Main | DE | 12 |
| Seattle | US | 65 |
| London | GB | 51 |
| Amsterdam | NL | 13 |
AuthenticationDetails lists each step of a sign-in. parse_json reads it, and mv-expand gives each step its own
row. Here are the two sign-ins where the password was right but the phone prompt was denied:
SigninLogs
| where ResultType == "500121"
| mv-expand Step = parse_json(AuthenticationDetails)
| project TimeGenerated, Method = tostring(Step.authenticationMethod), Succeeded = tostring(Step.succeeded)
Result on the sample · 4 rows
| TimeGenerated | Method | Succeeded |
|---|---|---|
| 2026-06-10 08:19:44 | Password | true |
| 2026-06-10 08:19:44 | Mobile app notification | false |
| 2026-06-10 08:20:09 | Password | true |
| 2026-06-10 08:20:09 | Mobile app notification | false |
Your turn
Show each city (LocationDetails.city) and how many sign-ins came from it.
Write it in the box below and check it. Then compare with one answer; others can be right too.
Show one answer
SigninLogs
| extend City = tostring(LocationDetails.city)
| summarize SignIns = count() by City
| sort by SignIns desc
Result on the sample · 4 rows
| City | SignIns |
|---|---|
| Seattle | 65 |
| London | 51 |
| Amsterdam | 13 |
| Frankfurt am Main | 12 |
Check your own query
Write your query for the task above and check it against the real schema.
All data on this page is sample data, made up for this course. The IP addresses come from ranges reserved for documentation, and the people and the company are fictional.
Card by Kaushik Saha. Every query checked with Microsoft.Azure.Kusto.Language 12.4.1 against schema bundle 2026.10.29; every result computed on the course's sample with Kusto-Loco 1.4.9, an open-source KQL engine (credits). The story's clock reads 12:00 UTC on 10 June 2026.