title: Translate python dict to json
body: <p>I am trying with jinja2 to traverse a python dict to json. I have the following python structure</p>
  
  <pre><code>examples:
     ex1: example1
     ex2: example2
  </code></pre>
  
  <p>With the following jinja2:</p>
  
  <pre><code>examples= [{{(examples|default({}))|tojson}}]
  </code></pre>
  
  <p>I am achieving</p>
  
  <pre><code>   examples=[{"ex1":"example1","ex2":"example2"}]
  </code></pre>
  
  <p>How can i achieve </p>
  
  <pre><code>examples=[{"ex1":"example1"},{"ex2":"example2"}]
  </code></pre>