sitemule / noxDB

Not only XML. SQL,JSON and XML made easy for IBM i
MIT License
42 stars 20 forks source link

Pushing new array element to array with UBOUND fails #50

Open m1h43l opened 3 years ago

m1h43l commented 3 years ago

I would expect that jx_setNum(json : '[UBOUND]' : 1234.5678); adds the value to the array but it seems that it somehow replaces the array (or redefines the array node to a non-array node?). The outcome is that the array is now the single value I just pushed.

Unit test NOXDBUT2 test case TEST_ARRAY_PUSH_UBOUND. Test file: unittests/data/parser/test9-array-push-ubound.json

NielsLiisberg commented 2 years ago

UBOUND gives the number of current elements . The correct way to do this will be:

jx_setNum(json : '[]' : 1234.5678);

However syntactically - you are right, so issue stays open