adobe / json-formula

Query language for JSON documents
http://opensource.adobe.com/json-formula/
Apache License 2.0
19 stars 8 forks source link

deepScan function throws an error if a key fails #110

Closed vdua closed 7 months ago

vdua commented 7 months ago

Consider the data

{
 "e" : [
   {"b1" : 1},
   {"b2" : 2, "c" : null},
   {"b1" : 3}
  ]
}

and the expression

deepScan(e, "b1")

The expression throws an error

https://stackblitz.com/edit/js-fh4uvq?file=index.js

Expected Behaviour

It should not throw an error

Actual Behaviour

Reproduce Scenario (including but not limited to)

See the application https://stackblitz.com/edit/js-fh4uvq?file=index.js

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem