title: playframework .json template List-Ojects with foreach?
body: <p>My Problem is: I don't want to return the whole model object structure and datas in a json response. renderJSON() returns everything from the model in the response.</p>
  
  <p>So I thought the best way would be to use *.json templates. Ok and now I have a List and I don't now how the syntax in the *.json-template must be.</p>
  
  <p>Part of Controller:</p>
  
  <pre><code>List&lt;User&gt; users = User.find("byActive", true).fetch();
  if (users != null) {
      render(users);
  }
  </code></pre>
  
  <p>"User/showAll.json" (template):</p>
  
  <pre><code>//something like foreach( User currentUser in users )
  {
      "username": "${currentUser.name}",
      "userdescr": "${currentUser.description}"
  }
  </code></pre>
  
  <p>For a single user it's no problem, I got it, but how does it look like for a List of users inside the json template?</p>