<form>
<table class="tableheight" id="customers">
<tbody style='height:270px;display:block;overflow:auto;width:286px'>
<tr>
<th style=" border-top-left-radius: 10px;">Add a Friend</th>
<th style=" border-top-right-radius: 10px;text-align:center;"><i style="color:green;font-size:25px;background-color:white;" class="fas fa-check-circle"></i></th>
</tr>
<% if(friend.length==0){ %>
<h2> No Bookmarks Added Yet! </h2>
<% } %>
<% friend.forEach(function(f,i){ %>
<tr>
<td style="padding-right:110px;"><%= f.name %></td>
<td style="text-align:center;"><input type="checkbox" name="<%= f.name %>">
</td>
</tr>
<% }) %>
</tbody>
</table>
</div>
</form>
Unable to read data of form in the backend. Is there a way to read it? I have tried req.body.cur where cur is the value of <%= f.name %> The issue is only with friend.forEach loop