jmespath.js
jmespath.js copied to clipboard
Path with a string that starts with a numeral throws an error
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?
You need to use a quoted-identifier :
-
foo."15bar"