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

JSON for in/of must be reviewed #212

Open
darnocian opened this issue Oct 9, 2024 · 0 comments
Open

JSON for in/of must be reviewed #212

darnocian opened this issue Oct 9, 2024 · 0 comments
Assignees

Comments

@darnocian
Copy link
Collaborator

when doing a for loop over TJSONObject, the for in/of is not consistent with normal arrays and dictionaries.

normally, 'for in', will loop over the indices, where 'for of' will loop over the values.

Havn't tested exhaustively, but noticed that with the TJSONValue:

{
 "globals": [ 5,4,3]
}

and

<% for x in globals ; x ; betweenitems %>, <% end %>

should give

 0, 1, 2

but it gives:

 5, 4, 3

This is the behaviour of

<% for x of globals ; x ; betweenitems %>, <% end %>
@darnocian darnocian changed the title JSON for in/of must be reviewed over a dictionary JSON for in/of must be reviewed Oct 9, 2024
@darnocian darnocian self-assigned this Dec 11, 2024
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

1 participant