diff --git a/docs/AdvancedFeatures.md b/docs/AdvancedFeatures.md index 644326cd..af17c3bc 100644 --- a/docs/AdvancedFeatures.md +++ b/docs/AdvancedFeatures.md @@ -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 + # list of objects - DEF listOfMaps=: - key1: obj1val1 @@ -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