Created
June 28, 2025 12:18
-
-
Save weeyin83/54fe80022e3ef834d3bd226657cc7587 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resources | |
| | where type =~ 'microsoft.hybridcompute/machines' or type =~ 'Microsoft.Compute/virtualMachines' | |
| | extend TagsObject = parse_json(tags) // Parse the JSON string into a dynamic object | |
| | project name, City = tostring(TagsObject.City), Environment = tostring(TagsObject.Environment) // Extract the City tag as a string | |
| | summarize CityCount = count() by City // Group by City and count occurrences |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment