Syntax
interpol(hash,string)
Description
The interpol() function returns a string with tokenised names replaced by the hash token value.
Example
data=[{"Name": "Jim Spriggs", "Age": 70, "Address": "10 Bushy Spon"},
{"Name": "Ned Seagoon", "Age": 50, "Address": "No. 4, The Dustbin"}
]
text="${Name} is aged ${Age} and lives at ${Address}"
foreach entry in data {
println(interpol(entry, text))
}
Jim Spriggs is aged 70 and lives at 10 Bushy Spon
Ned Seagoon is aged 50 and lives at No. 4, The Dustbin