title: How to parse/decode JSON object in smarty template?
body: <p>I have the following code in my template file:</p>
  
  <pre><code>{foreach from=$items item=entry}
    &lt;pre&gt;
      {$entry-&gt;nb_persons|@print_r}
    &lt;/pre&gt;
  {/foreach}
  </code></pre>
  
  <p>The output is (json string):</p>
  
  <blockquote>
    <p><code>{"ip":"12.12.12.12","date":1375616434,"cartitems":["foo:1"],"company":"dsad","FirstName":"sad","LastName":"asdsad","street":"","postcode":"","city":"","country":"Andorra","phone":"456456","fax":"","email":"sad@sad.com","comefrom":"google","request":"","message":"sadads"}</code></p>
  </blockquote>
  
  <p>I would like to print each element seperated, for example :</p>
  
  <blockquote>
    <p><code>{$entry-&gt;nb_persons.company}</code></p>
  </blockquote>
  
  <p>Should give me -> "dsad"</p>
  
  <p>But this is not working and I'm not sure why.</p>