Reference - Apache VTL Syntax

Reference - Apache VTL Syntax

Variable Syntax Output

Normal Variable

#set($a = "ValueA")
show $a
ValueA

Array of integers

#set($a = [1..3])
show $a[2]
3

Array of strings

#set($a = ["ValueA", $ValueB, "ValueC"])
show $a[2]
ValueC

Map

#set($a = {"ValueA" : "ValueB", "ValueC" : "ValueD"})
show ${a.ValueA}
ValueB