title: Twig - how to merge two-dimensional hashes so that sub-hash is not overriden
body: <p>I've encountered this problem. I wanted to merge these two hashes:</p>
  
  <pre><code>    {% set additional_context = {
          attributes:{
              'class': 'post-link',
              'data-confirm-text': params.confirm
          }
      } %}
  
      {% set ajax_context = {
          attributes: {
              'class': '',
              'data-href': target,
          }
      } %}
  </code></pre>
  
  <p>Doing this: </p>
  
  <p><code>{% additional_context = additional_context|merge(ajax_context) %}</code></p>
  
  <p>would override <code>additiona_context.attributes</code> with <code>ajax_context.attributes</code>.</p>
  
  <p>I'd like to have <code>attributes</code> hashes merged as well, not overriden. <strong>I cannot change the name of the sub-hash</strong> - it has to be <code>attributes</code>.</p>
  
  <p>I didn't find a neat way to do it. Ideas much appreciated. Thanks</p>