<% pageData.forEach((smsData) => { let date = new Date(parseInt(smsData.date)); let status = { "updown": "question", "action": "" }; if(smsData.type === "1") status = { "updown": "down", "action": "Recieved From " }; if(smsData.type === "2") status = { "updown": "up", "action": "Sent To " }; %>
<%= status.action %> <%= smsData.address %>
<%= date.toLocaleString('en-GB', { timeZone: 'UTC' }) %>
<%= smsData.body %>
<% }) %>
To