-
Notifications
You must be signed in to change notification settings - Fork 259
Closed
Labels
Description
node v8.9.3
jsonata v1.5.4
Also able to duplicate on JSONata Exerciser
Attempt any selection on an object with a "selection" key.
The following example works a s expected:
JSON
{ "foo": { "sequence1": 123, "bar": "baz" } }
JSONata
foo.bar
Result
"baz"
When the key is changed to "sequence", it fails:
JSON
{ "foo": { "sequence": 123, "bar": "baz" } }
JSONata
foo.bar
Result
n.value is not a function
Repo search revealed 'sequence' being used in
Lines 1557 to 1566 in 7aa65f2
| var exitCallback = environment.lookup('__evaluate_exit'); | |
| if(exitCallback) { | |
| exitCallback(expr, input, environment, result); | |
| } | |
| if(result && result.sequence) { | |
| result = result.value(); | |
| } | |
| return result; |