OT Display api response in table

I am working with Node and Express to work on a web interface without any web development experience. I have it working to where I can get the json response on the client brower from the BAQSvc. Does anybody have any sample code of rendering the json data into html tables or what would be the best way to handle this? I got stuck trying to use EJS and Datatables so hoping someone has done this before and can point me in the best direction.

console.log(data); Available?

I put this server side.

request(options, function (error, response) {
if (error) throw new Error(error);
// res.json(response)
res.render(“quotes.ejs”, {data:response});

And this in the .ejs and it looks like I am getting the header response in the console. So a bit closer.

var data =<%-JSON.stringify(data)%>


I have it working. The problem was datatables expecting an object and I was converting it to a string.

1 Like