File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
test/test-suite/groups/flattening Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -1671,7 +1671,7 @@ const functions = (() => {
16711671 var res = lookup ( input [ ii ] , key ) ;
16721672 if ( typeof res !== 'undefined' ) {
16731673 if ( Array . isArray ( res ) ) {
1674- result . push ( ... res ) ;
1674+ res . forEach ( val => result . push ( val ) ) ;
16751675 } else {
16761676 result . push ( res ) ;
16771677 }
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ var jsonata = (function() {
283283 resultSequence . push ( res ) ;
284284 } else {
285285 // res is a sequence - flatten it into the parent sequence
286- Array . prototype . push . apply ( resultSequence , res ) ;
286+ res . forEach ( val => resultSequence . push ( val ) ) ;
287287 }
288288 } ) ;
289289 }
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "expr" : " ( $data := { 'number': [1..2e5].$string() }; $values := $data.number; $count($values) )" ,
4+ "data" : null ,
5+ "result" : 200000 ,
6+ "timelimit" : 10000 ,
7+ "depth" : 10
8+ },
9+ {
10+ "expr" : " ( $data := { 'number': [1..2e5].$string() }; $values := $lookup($data, 'number'); $count($values) )" ,
11+ "data" : null ,
12+ "result" : 200000 ,
13+ "timelimit" : 10000 ,
14+ "depth" : 10
15+ }
16+ ]
You can’t perform that action at this time.
0 commit comments