Azure 如何在填充选取列表时对Extension task.json中的datasourcebindings进行排序和筛选

Azure 如何在填充选取列表时对Extension task.json中的datasourcebindings进行排序和筛选,azure,azure-aks,azure-devops-extensions,json-path-expression,Azure,Azure Aks,Azure Devops Extensions,Json Path Expression,我正在使用API在我的实用程序的选择列表中获取可用的AKS版本。我只想以从高到低的顺序显示最新的4个版本 我的代码的当前版本提供了该地区的所有可用版本- { "name": "kubeVersion", "type": "picklist", "label": "Kubernetes Version", "defaultValue": &q

我正在使用API在我的实用程序的选择列表中获取可用的AKS版本。我只想以从高到低的顺序显示最新的4个版本

我的代码的当前版本提供了该地区的所有可用版本-

{
   "name": "kubeVersion",
  "type": "picklist",
  "label": "Kubernetes Version",
  "defaultValue": "",
  "required": true,
  "helpMarkDown": "Select the version of the Kubernetes that needs to be installed on the AKS cluster.",
 
},
.
.
.
 {
   "target": "kubeVersion",
   "endpointId": "$(ConnectedServiceName)",
   "endpointUrl": "{{{endpoint.url}}}/subscriptions/$(endpoint.subscriptionId)/providers/Microsoft.ContainerService/locations/$(rsgLocation)/orchestrators?api-version=2019-04-01&resource-type=managedClusters",
   "resultSelector": 
   "jsonpath:$.properties.orchestrators[*].orchestratorVersion",
   "parameters": {
    "rsgLocation": "$(rsgLocation)"
  }
},
在上面的代码中,我在jsonpath中给出了[*],它选择了所有可用的值。就像是
1.10.12

1.10.13

1.14.6

1.15.3


你能帮我添加过滤器和分类吗?我想对这些值从最新到最早进行排序,只取前4个版本。稍后,需求可能会更改为1.X.*和1.Y.*,因此我希望能够进行筛选。你能告诉我这些是什么类型的符号吗?我可以从哪里学习?如果有任何建议可以满足这些要求,我将不胜感激。

您使用哪种API?@CharlesXu在端点URL中有:“{subscriptionId}/providers/Microsoft.ContainerService/locations/{rsgLocation}/orchestrators?API version=2019-04-01&resource type=managedClusters”您使用哪种API?@CharlesXu在端点URL中有:“{subscriptionId}/providers/Microsoft.ContainerService/locations/{rsgLocation}/orchestrators?api版本=2019-04-01&resource type=managedClusters”