Skip to content
Discussion options

You must be logged in to vote

I like that you wrote:

"it seems that all examples have static list..."

I do because they are not. They may seem, but in Jamal, nothing is static. Anything can be the result of a macro evaluation. So if you have a file and want to have a for to iterate through all the lines, you need two things, plus an optional third:

  1. Specify that the value separator is a new line

  2. Somehow, get the lines between the opening ( and closing ) strings.

  3. Use something else other than ( and ) as opening and closing strings when the ) character may be present in the file.

How should you do that? Let's get it one by one.

The for macro has an option called separator. For example, the following code:

{@for …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ypiel-talend
Comment options

@ypiel-talend
Comment options

Answer selected by verhas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants