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

Added example for map of lists to documentation #737

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions docs/AdvancedFeatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,27 @@ There is also a multi-line variant of the DEF statement that allows to define co
- group-${loopVar}:
- name: "Group ${loopVar}"

# map (functions keys() or values() can be used to loop over map)
- DEF simpleMap=:
key1: mapval1
key2: mapval2
key3: mapval3
- FOR loopVar IN ${keys(simpleMap)}:
- group-${loopVar}:
- name: "Value ${simpleMap[loopVar]}"

# map of lists
- DEF languages=:
canada:
- en
- fr
switzerland:
- de
- fr
- it
germany:
- de
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ackoch here the indentation is wrong?


# list of objects
- DEF listOfMaps=:
- key1: obj1val1
Expand All @@ -89,14 +110,7 @@ There is also a multi-line variant of the DEF statement that allows to define co
- group-${loopVar.key1}:
- name: "Group ${loopVar.key2} ${loopVar.key3}"

# map (functions keys() or values() can be used to loop over map)
- DEF simpleMap=:
key1: mapval1
key2: mapval2
key3: mapval3
- FOR loopVar IN ${keys(simpleMap)}:
- group-${loopVar}:
- name: "Value ${simpleMap[loopVar]}"

```

### Global variables
Expand Down