#assign foo = "awes...">Geek asks and answersGet the value of a string stored in a variable whose name is stored as a string in another variable<#assign blah = "foo"> <#assign foo = "awesome"> Is it possible to make "awesome" without reference to foo?I tried something like ${${blah}}But it does not work, any ideas?+3freemarkerMudit tuli Jan 22 '14 at 7:41source share1 answerThere is a built-in evalthat evaluates the string as an FTL expression.In your case, use it like this:${blah?eval} +4Aleksandr M Jan 22 '14 at 12:19source shareMore articles:HAProxy redirected along the way? - haproxyПроверка подлинности django 1.6 в пользовательской модели пользователя - djangoandroid with custom action bar with home button - androidHow many string objects are created for the next? - javaHow does Jena SDB (RDF relational database support) handle SPARQL queries? - mysqlMySQL dynamic inner join to combine multiple rows into one? - sqlhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/2102640/return-custom-error-codes-to-client-in-the-response-for-a-jax-rs&usg=ALkJrhi19g1vsz3YQZyzYDTEvcocgGTZGwAutocomplete without WebService? - jqueryHow to change default first week day number to 0 in Python calendar module - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/2102643/expose-property-placeholder-properties-to-the-spring-environment&usg=ALkJrhji2LAOUxV5w6pkFi0KH6LliiW_DAAll Articles
<#assign blah = "foo"> <#assign foo = "awesome">
Is it possible to make "awesome" without reference to foo?
I tried something like ${${blah}}
${${blah}}
But it does not work, any ideas?
There is a built-in evalthat evaluates the string as an FTL expression.
eval
In your case, use it like this:
${blah?eval}