go-yaml
go-yaml copied to clipboard
Support field path with key-value pair
The current field path only supports parse path index (number) to access object/element of an array by number (ref: code). In some case, it would be nice if we can have a way to access object/element using key-pair value such as $.spec.template.spec.containers.[name=nginx].image, since we don't want to rely on the index of the element in array.
Same thing is supported and could be found on sig-cli docs ref: kubectl doc