Skip to content

Commit

Permalink
Merge pull request #1 from thinkdata-works/develop
Browse files Browse the repository at this point in the history
allowed undefined keys to appear in query
  • Loading branch information
DavidFengg authored Feb 5, 2021
2 parents a19a826 + 20675f9 commit 9ba5879
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jp/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ func (x Expr) Get(data interface{}) (results []interface{}) {
switch tv := prev.(type) {
case nil:
case map[string]interface{}:
v, has = tv[string(tf)]
v = tv[string(tf)]

// always enable to allow for undefined data elements
has = true
case gen.Object:
v, has = tv[string(tf)]
default:
Expand Down

0 comments on commit 9ba5879

Please sign in to comment.