From 2987c60d925109faf0a6e869a9d96c319bdc1ec6 Mon Sep 17 00:00:00 2001 From: Mengjiao Liu Date: Fri, 28 Jul 2023 10:47:06 +0800 Subject: [PATCH] Fix inconsistent command in the JSONPath Support page --- content/en/docs/reference/kubectl/jsonpath.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/reference/kubectl/jsonpath.md b/content/en/docs/reference/kubectl/jsonpath.md index f1aa5f8ec4..230ded2640 100644 --- a/content/en/docs/reference/kubectl/jsonpath.md +++ b/content/en/docs/reference/kubectl/jsonpath.md @@ -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 >}}