Open WarL0ckNet opened 1 year ago
Hello @WarL0ckNet, you can check the folder testdata/v2
. There is a file about the iteration feature.
In iteration.pug
:
ul
each val, index in map[int]string{1:"one",2:"two",3:"three"}
li= strconv.Itoa(index) + ": " + val
For how write one item from map? You can try something with un/buffered code feature:
-
var mymap = map[string]string{"one":"","two":"","three":""}
doctype 5
html
body
p= mymap["one"]
In https://pugjs.org/language/iteration.html
How this write in your engine?
And how write one item from map? Example .arr[.key].field