I have a results variable that is an array of objects. I carry the results variable from my javascript file to my main route file. I am trying to render my page to display l
<ul>
<% for(var i=0; i<results.length; i++) { %>
<li>
<%= results[i] %>
</li>
<% } %>
</ul>
This will show list of id of your results, just change _id by your property of objects as you want to show.
<ul>
<% results.map((result)=>{ %>
<li>
<%= result._id %>
</li>
<% }) %>
</ul>
My answer is as follows. I changed one line from the answer by other person.
<ul>
<%for (var result in results){%>
<li><%=result%>:<%=results[result]%></li>
<%}%>
</ul>
Try this:
<ul>
<%for (var result in results){%>
<li><%=result%></li>
<%}%>
</ul>