Is there a way to update an object\'s property in twig?
An object like the following is passed to twig:
object property1 property2
If your property is array (object->property['key']) you can do something like this:
{% set arr = object.property|merge({"key":['some value']}) %} {{ set(object, 'property', arr) }}
That equivalent to:
this->property['key'][] = 'some value';