How to array of objects in template ejs?

后端 未结 4 1475
遥遥无期
遥遥无期 2021-01-12 18:57

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

4条回答
  •  迷失自我
    2021-01-12 19:36

    My answer is as follows. I changed one line from the answer by other person.

      <%for (var result in results){%>
    • <%=result%>:<%=results[result]%>
    • <%}%>

提交回复
热议问题