I am writting a simple system displaying data from my JSON instead of using a database. Everything works fine except for the html tags, which are displayed as plain text. Also note that I am the only one able to write in the json file, that's why I want to display html tag from it.
So here is the output
From page : <p>Test <b>Big Test</b> <i>Italic Test</i>.</p>
From source : <p>Test <b>Big Test</b> <i>Italic Test</i>.</p>
Here is the output I want : Test Big Test Italic Test.
Here is pretty much how I store it in my Json file :
{
"table": [
{
"desc": "<p>Test <b>Big Test</b> <i>Italic Test</i>.</p>"
}
]
}
I've tried many things from the internet without a lot of many success. I am using express.
Here is how I parse it (note that there are many fields in the table and I am iterating through them all)
<%= parser['table'][i].desc %>