How to add query parameters in twig using path()? I am following the code snippet provided here

{# Link to frontpage view. #} &lt;a href="{{ path('view.frontpage.page_1') }}"&gt;{{ 'View all content'|t }}&lt;/a&gt;

{# Link to user entity/profile page. #} &lt;a href="{{ path('entity.user.canonical', {'user': user.id}) }}"&gt;{{ 'View user profile'|t }}&lt;/a&gt;

{# Link to node page. #} &lt;a href="{{ path('entity.node.canonical', {'node': node.id}) }}"&gt;{{ 'View node page'|t }}&lt;/a&gt;


https://www.drupal.org/docs/8/theming/twig/functions-in-twig-templates#path

As the function says path($name, $parameters, $options), I want to add a link which has query parameters as shown in below

blue?destination=blue-search&amp;cookie[blue_referrer]=3622&amp;cookie[blue_type]=node


I tried implementing it as follows 

&lt;a href="{{ 
               path('blue_general.blue',
               {'node': node.id}, 
               {'query': [
                 'destination': path('view.blue_search.page_1'),
                 'cookie[blue_referrer]': node.id,
                 'cookie[blue_type]':'node'
                 ] 
                }
               ) 
               }}"&gt;Find a Distributor&lt;/a&gt;


but it gives an error


  The website encountered an unexpected error. Please try again
  later.Twig_Error_Syntax: An
  array element must be followed by a comma. Unexpected token
  &quot;punctuation&quot; of value &quot;:&quot;
  (&quot;punctuation&quot; expected with value &quot;,&quot;). in Twig_TokenStream-&gt;expect() (line 124 of /templates/node/node--product.html.twig).
  Twig_ExpressionParser-&gt;parseArrayExpression()
  (Line: 205)
Twig uses hashes where PHP uses associative arrays. So to fix your code just convert the array syntax to a hash literal:

{{ 
  path('blue_general.blue',
    {'node': node.id}, 
    {'query': {
      'destination': path('view.blue_search.page_1'),
      'cookie[blue_referrer]': node.id,
      'cookie[blue_type]':'node'
    }}
  ) 
}}