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
it may be better to join strings with strings: locations[].{"CityState": join(' - ', [name, state])}
I don't know what is happening but it's a bit more complicated than just stripping. With locations[].{"CityState": join(`true`, [name, state])} you'll get an error.
Your expression uses deprecated syntax which is no longer valid JMESPath since JEP-12 Raw String Literals have been introduced. Because it will try and interpret ` - ` as JSON - which is not valid.
@alk-acezar is right, you MUST use raw-string literals instead in your expression.
I was confused by the behaviour of the following:
when queried with the following JMESPath expression:
outputs the following:
Note that this also occurs on the jmespath.org website so is presumably not just a Python implementation issue.
I noticed 4c87771#diff-ff12e4d40b1d1e1df346464bf6958de94c760d06acc3fce591b6ccf94e3b9449R137 adding the
lstrip
here but there's no explanation as to why that I can see and I can't see anything in the spec. I also didn't see anything jump out at me from a very quick look at the Go implementation but it's also a bit trickier to follow there.The text was updated successfully, but these errors were encountered: