jsonpath example of child with dot in name (#17625)
Promoting the solution shown in https://github.com/kubernetes/kubernetes/issues/23386#issuecomment-305348170 to formal documentation.
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
7bf90015f0
commit
41d5f445b2
@@ -69,7 +69,7 @@ Function | Description | Example
|
|||||||
--------------------|---------------------------|-----------------------------------------------------------------|------------------
|
--------------------|---------------------------|-----------------------------------------------------------------|------------------
|
||||||
`text` | the plain text | `kind is {.kind}` | `kind is List`
|
`text` | the plain text | `kind is {.kind}` | `kind is List`
|
||||||
`@` | the current object | `{@}` | the same as input
|
`@` | the current object | `{@}` | the same as input
|
||||||
`.` or `[]` | child operator | `{.kind}` or `{['kind']}` | `List`
|
`.` or `[]` | child operator | `{.kind}`, `{['kind']}` or `{['name\.type']}` | `List`
|
||||||
`..` | recursive descent | `{..name}` | `127.0.0.1 127.0.0.2 myself e2e`
|
`..` | recursive descent | `{..name}` | `127.0.0.1 127.0.0.2 myself e2e`
|
||||||
`*` | wildcard. Get all objects | `{.items[*].metadata.name}` | `[127.0.0.1 127.0.0.2]`
|
`*` | wildcard. Get all objects | `{.items[*].metadata.name}` | `[127.0.0.1 127.0.0.2]`
|
||||||
`[start:end:step]` | subscript operator | `{.users[0].name}` | `myself`
|
`[start:end:step]` | subscript operator | `{.users[0].name}` | `myself`
|
||||||
|
|||||||
Reference in New Issue
Block a user