Let's say I have a Freemarker A variable, which, for example, contains the name of another variable in the hash tree. "B." I would like to use a to read the value of B, for example, if B contained "C", I could tell Freemarker about the release of C using A: ${${A}} should lead to the output of "C". Naturally, this does not work in the FreeMarker, but is there a way to do this?
${${A}}
Use the special variable .vars, which is the hash (map) of the variables, and therefore you can use the aHash [aKeyExpression] syntax:
${.vars[A]}
via Daniel Deccany, author and accompanying documentation
Source: https://habr.com/ru/post/1741348/More articles:Reading data from a PHP text file - fileWill Apache running on port 8080 prevent dynamically loaded scripts in JavaScript? - javascriptЛучший способ генерации сообщения soap xml? - c#The fastest way to find the sum of digits for large numbers - c ++jQuery hide all rows of a table that contain a hidden field corresponding to a value - jqueryFacebook API issue, authorization revocation - javascriptDoes IE 7 support pseudo-class content? - cssVertical Width of ButtonBar - flexIllustration of a buffer overflow for students (linux, C) - ciBatis - choosing environment using XML - environmentAll Articles