Closed gunzip closed 5 years ago
Jexl is very similar to Javascript in that top-level variables in the context cannot contain dashes, start with a number, etc. But it's also similar to javascript in that, if it's not at the top level, you can quote it:
const context = { baz: { 'foo-bar': 'foobar' } }
const res = jexl.evalSync('baz["foo-bar"] == "foobar"', context)
console.log(res) // true
Hope this helps!
Closing until this need is articulated again :)
hi. is there any way to escape the dash (minus sign) character ?
results
false