title: Update property in collection with spring expression language (SpEL)
body: <p>Is it possible with spring expression language to extract a collection and at the same time modify a property on each object in the collection? In my example I have a list of users whose name is too lang and I would like to limit the length of the names before they are displayed in a page (so not update the original list). This code is used in a controller which is requested via ajax and the list of users is returned as a json array.</p>
  
  <pre><code>ExpressionParser parser = new SpelExpressionParser();
  EvaluationContext context = new StandardEvaluationContext(rankedUsers);
  List&lt;User&gt; longNamedUsers = (List&lt;User&gt;) parser.parseExpression("?[name.length() &gt; 20]").getValue(context);
  
  EvaluationContext newContext = new StandardEvaluationContext(longNamedUsers);
  // the below does not work but throws an exception
  //parser.parseExpression("?[name]").setValue(newContext, "test");
  </code></pre>