How can I get JSON data into my ejs template?
<p>I am trying to display JSON data but I have this error. Can anyone help me with this please? </p>

<blockquote>
  <p>Error -- > Unexpected token ; in
  "/home/ubuntu/workspace/project_guest_book/views/pages/posts.ej</p>
</blockquote>

<p>The code that causing error is below: </p>

<pre><code>&lt;%  var post = require(__dirname +"/userPosts.json")
        var result= %&gt; 
          &lt;table&gt;
            &lt;% for (var i=0; i&lt;post.length; i++){
               result += %&gt;
                 &lt;tr&gt;
                    &lt;th&gt;&lt;% post[i].Name+ %&gt;&lt;/th&gt;
                    &lt;td&gt;&lt;% post[i].Post %&gt;&lt;/td&gt;
                 &lt;/tr&gt;
            &lt;% } %&gt;
          &lt;table&gt;
</code></pre>