title: Node js swig object display
body: <pre><code>{% for item in list %}
          &lt;div class="todo_item"&gt;
              &lt;span class="hidden_id"&gt;{{ item.id }}&lt;/span&gt;
              &lt;div class="item_title"&gt; {{item.title}}&lt;/div&gt;
              &lt;div class="item_tooltip"&gt;date {{item.dateCreated}}&lt;/div&gt;
              &lt;div class="item_tooltip"&gt;{{ item|json_encode }}&lt;/div&gt;
          &lt;/div&gt;
          {% endfor %}
  </code></pre>
  
  <p>The {{ item|json_encode }} output is :</p>
  
  <pre><code>{"_id":"53f82ab44f3254584e970684","username":"k4","title":"kkk3323","__v":0,"dateCreated":"2014-08-23T05:46:28.326Z","status":true}
  </code></pre>
  
  <p>The {{item.dateCreated}} displays [object Object].</p>
  
  <p>And I use {{ item.id }}, not the {{ item._id }} because of the [object Object] output.</p>