Skip to content

Object iterator #138

Open
Open
@mykael22000

Description

@mykael22000

Can we get a simple loop mechanism to iterate over the properties of a javascript object?

<<for $ix in $jvar>>
  <<print $jvar[$ix]>>
<<endfor>

This would make it a lot easier and more efficient to process arrays and dictionaries.

If $jvar isn't a java script object, there should be an error message.
If $jvar is a proper array, $ix should run over just the valid numerical keys (0 to $jvar.length - 1)
Otherwise $ix run through the complete list of properties defined for the object.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions