Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushing new array element to array with UBOUND fails #50

Open
m1h43l opened this issue Sep 17, 2021 · 1 comment
Open

Pushing new array element to array with UBOUND fails #50

m1h43l opened this issue Sep 17, 2021 · 1 comment

Comments

@m1h43l
Copy link
Contributor

m1h43l commented Sep 17, 2021

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants