You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a user, I would like to be able to use JSONPath filters to recursively search for a particular value on yaml nodes that are not only limited to arrays/sequence nodes.
An example of this would be when a user would like to look up all instances of a value in a kubernetes manifest, so that all instances of that value can be replaced.
Consider the following query and Kubernetes manifest: $..[?(@ == "dns-udp")]
---
apiVersion: v1kind: Servicemetadata:
name: bind-udpnamespace: tanzu-dnslabels:
app.kubernetes.io/name: external-dnsannotations:
# NOTE: this only works on 1.19.1+vmware.1+, but not prior## This annotation will be ignored on other cloud providersservice.beta.kubernetes.io/aws-load-balancer-type: nlbspec:
selector:
app.kubernetes.io/name: external-dnstype: LoadBalancerports:
- name: dns-udpport: 53protocol: UDPtargetPort: dns-udpstatus: {}
I would like the yamlNodes returned which should contain the values:
[
"dns-udp",
"dns-udp"
]
The text was updated successfully, but these errors were encountered:
JefeDavis
pushed a commit
to JefeDavis/yaml-jsonpath
that referenced
this issue
May 28, 2021
As a user, I would like to be able to use JSONPath filters to recursively search for a particular value on yaml nodes that are not only limited to arrays/sequence nodes.
An example of this would be when a user would like to look up all instances of a value in a kubernetes manifest, so that all instances of that value can be replaced.
Consider the following query and Kubernetes manifest:
$..[?(@ == "dns-udp")]
I would like the yamlNodes returned which should contain the values:
The text was updated successfully, but these errors were encountered: