Added @key loop accessor

This commit is contained in:
Joseph Dalrymple
2023-04-03 21:12:17 -05:00
parent 6dc284f05a
commit c28bffe708
7 changed files with 66 additions and 5 deletions

View File

@@ -1,3 +1,3 @@
<b>resque</b>
<b>hub</b>
<b>rip</b>
<b>0 - resque</b>
<b>1 - hub</b>
<b>2 - rip</b>

View File

@@ -1,3 +1,3 @@
{{#repo}}
<b>{{.}}</b>
<b>{{@index}} - {{.}}</b>
{{/repo}}

4
tests/assoc-array.env Normal file
View File

@@ -0,0 +1,4 @@
declare -A repo
repo[resque]="Resque"
repo[hub]="Hub"
repo[rip]="Rip"

View File

@@ -0,0 +1,3 @@
<b>hub - Hub</b>
<b>rip - Rip</b>
<b>resque - Resque</b>

View File

@@ -0,0 +1,3 @@
{{#repo}}
<b>{{@key}} - {{.}}</b>
{{/repo}}