title: FreeMarker hash lookup using object graph notation
body: <p>I have 2 variables in parameters map populated from a struts2 tag, as follows:</p>
  
  <ol>
  <li><code>obj</code> - A java object with various child objects. It can be treated as a hash in freemarker template.</li>
  <li><code>displayProperty</code> - A string containing property name inside the <code>obj</code>. The name can be object graph containing multiple levels of drill down.</li>
  </ol>
  
  <p>I want to display the given property of the <code>obj</code> using freemarker template. For example if <code>displayProperty</code> is <code>entity.name</code>, then it should essentially print value of <code>obj.entity.name</code>.</p>
  
  <p>My freemarker template is <code>${obj[displayProperty]}</code>, but it fails when <code>displayProperty</code> contains a dot.</p>