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 >}}