Skip to content

JSON for in/of must be reviewed  #212

@darnocian

Description

@darnocian

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 %>

Metadata

Metadata

Assignees

Labels

breaking changebugSomething isn't workingprpull request in reviewv2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions