In the Azure Cloud Shell, I can use az account list-locations
to get a list of all the locations supported in my subscription. How can I filter the response to only include the name property of the location and exclude all other properties?
Instead of a list of objects like this:
{
"displayName": "UK West",
"id": "<<removed>>",
"latitude": "53.427",
"longitude": "-3.084",
"name": "ukwest",
"subscriptionId": null
}
I want to get collection of names like this:
{
"name": "ukwest",
"name": "ukwest2",
"name": "ukwest3",
}
[]
- so an array containing strings or objects – Vernacularize