Here is the code:
{% if entry_name not in data and entry_total > 0 %}
{% set data = data|merge({ (entry_name) : entry_total }) %}
{% else %}
{% set data.entry_name = 10 %}
{% endif %}
Twig throws an error on the statement following else
condition. Unexpected token "punctuation" of value "." ("end of statement block" expected).
How can I set the value of a particular element of this associative array?