vmware-labs / yaml-jsonpath

JSONPath implementation for the gopkg.in/yaml.v3 node API
Other
49 stars 12 forks source link

Is there a way to find node case insensitively #50

Open KaiqianYang opened 1 year ago

KaiqianYang commented 1 year ago

Hello, I have a problem of finding node case insensitively that needing help.

image

I want to find whether the node configuration.appender.console exists, ignoring case sensitivity, so that it can match in all the three above cases. I know regex can be used in value filter like "$[*]["appenders"]["console"][?(@.name=~/(?i)stdout/)]", but how do i match the key of node ignoring case sensitivity?

Now I write $[*]["appenders","Appenders"][?(@.console || @.Console)], but this can only match case 1 and case 2.

Looking forward to response, thanks!