Fix inconsistent command in the JSONPath Support page

This commit is contained in:
Mengjiao Liu 2023-07-28 10:47:06 +08:00
parent 004c8d3d03
commit 2987c60d92
1 changed files with 1 additions and 1 deletions

View File

@ -108,6 +108,6 @@ JSONPath regular expressions are not supported. If you want to match using regul
kubectl get pods -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}'
# The following command achieves the desired result
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).spec.containers[].image'
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).metadata.name'
```
{{< /note >}}