Good Day everybody
If i use a console.log it prints it correctly, but it doesn’t write it to a table. And i have no idea why it doesn’t. Can someone help me please?
My EJS looks like this:
<% insrtdJngls.forEach((item) => { %>
<tr></tr>
<% console.log(item, "ejs print") %>
<% console.log(item.insrtdDateiname, "ejs print") %>
<td id="table_firma" class="tdList"><%=item.insrtdFirmaname%></td>
<td id="dateiname_table" class="tdList"><%=item.insrtdDateiname%></td>
<td id="table_time" class="tdList"><%=item.insrtdDateTime%></td>
<form method="post" action="/deleteOne">
<td><button class="DelOne"><img
src="https://img.icons8.com/ios/25/000000/empty-trash.png" /></button></td>
</form>
<form method="post" action="/deleteAll">
<td><button class="DelAllBtn"><img
src="https://img.icons8.com/fluency-systems-regular/25/000000/garbage-truck.png" /></button>
</td>
</form>
<% }); %>
And my ejs print looks like this:
{
insrtdDateTime: 2022-01-12T01:18:00.000Z,
insrtdDateiname: 'fantaWerbung',
insrtdFirmaname: 'Fanta'
} ejs print
fantaWerbung ejs print
{
insrtdDateTime: 2022-01-13T01:18:00.000Z,
insrtdDateiname: 'fantaWerbung',
insrtdFirmaname: 'Fanta'
} ejs print
fantaWerbung ejs print
But in the td, there is no output at all… if i write it with just item, it shows me, that there is one object, can someone explain?
Why doesn’t it write to the table like fantaWerbung? Because obviously the data it receives is correct…
Thanks a lot
Mats Groeneweg