Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path with a string that starts with a numeral throws an error #91

Open
caguthrie opened this issue Mar 21, 2023 · 1 comment
Open

Path with a string that starts with a numeral throws an error #91

caguthrie opened this issue Mar 21, 2023 · 1 comment

Comments

@caguthrie
Copy link

Using jmespath 0.15.0

This crashes with error jmespath.js:501 Uncaught ParserError: Unexpected token type: Number, value: 15

search({ foo: { '15bar': 'baz' } }, 'foo.15bar')

How can I access keys if they start with numbers?

@springcomp
Copy link

You need to use a quoted-identifier :

  • foo."15bar"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants