Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
382 stars 1.23k forks source link

Trouble with JMES Query because of dots in fieldnames #2554

Open ivog opened 4 years ago

ivog commented 4 years ago

az boards query --id 02187725-f42d-4a44-b787-afc2e52629f8 --query "[0:1].fields" retrieves:

[
  {
    "System.AreaPath": "AreaPath",
    "System.Id": 87,
    "System.IterationPath": "ProjectName\\Iteration 1",
    "System.State": "Active",
    "System.Title": "Tasktitle",
    "System.WorkItemType": "Task"
  }
]

I'm trying to retrieve only a list of workitem titles but I'm having a hard time constructing a working jmespath because of the dots used in the fieldnames.

I've tried

az boards query --id 02187725-f42d-4a44-b787-afc2e52629f8 --query "[0:1].fields.'System.Title'" az boards query --id 02187725-f42d-4a44-b787-afc2e52629f8 --query "[0:1].fields.System.Title" az boards query --id 02187725-f42d-4a44-b787-afc2e52629f8 --query "[0:1].fields.System.Title" az boards query --id 02187725-f42d-4a44-b787-afc2e52629f8 --query '[0:1].fields."System.Title"'

any clue on how to select only specific fields?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07.

yonzhan commented 4 years ago

boards

matthewboler commented 3 years ago

any progress on this issue?