HTML
is actually a markup language which is received as static content and displayed as per the markup within it. It is not a programming language and does not have loops per se.
IF you are using a dynamic page populated by some server side technology (ASP.NET, PHP, etc) then the HTML is all generated on the server, so the client-side javascript will not be rendered for each item.
The best option if this is the case would be to just render the content out using that same server-side tech, something like this pseudocode
<% foreach (research r in orders) { %>
<table><tr>
<% foreach (key k in r) {
if ( k!= "id" ) { %>
<td><%=k%></td>
<%}
}
%> </tr>
If your data is coming in via an AJAX/Javascript method, then you would call your function from the javascript return portion of your data gathering method