From 691ca62bb3288ce472174458b2ae19f1e137f282 Mon Sep 17 00:00:00 2001 From: Daniel Mendes Date: Wed, 26 Aug 2020 19:55:51 +0200 Subject: [PATCH] Update content/en/docs/reference/kubectl/jsonpath.md Co-authored-by: Daniel Smith --- 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 cc4628a1c7..d26c110cee 100644 --- a/content/en/docs/reference/kubectl/jsonpath.md +++ b/content/en/docs/reference/kubectl/jsonpath.md @@ -107,7 +107,7 @@ JSONPath regular expressions are not supported. If you want to match using regul # The following command does not work kubectl get pods -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}' -# The following command achieves the same result +# The following command achieves the desired result kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).spec.containers[].image' ``` {{< /note >}}