How to set array value in twig template
arrays, symfony, twig
Solution
what about,
{% set params = params|merge({'redirect_uri': 'http://site.loc/'}) %}
Problem
How I can change my array value by string index in twig template? I'm trying: ``` {% do params['redirect_uri'] = 'http://site.loc/' %} ``` but I get nex error: ``` Unexpected token "operator" of value "=" ("end of statement block" expected) in BWUserBundle:User/social:sign-in-thumbs.html.twig at line 4 ``` I also trying: ``` {% set params['redirect_uri'] = 'http://site.loc/' %} ``` but have error too: ``` Unexpected token "punctuation" of value "[" ("end of statement block" expected) in BWUserBundle:User/social:sign-in-thumbs.html.twig at line 4 ``` Any ideas?