Does anyone know how I can execute
req.body.documents.forEach(element => {
console.log(element['_index']);
console.log(element['_id']);
console.log(element['_source'].uuid);
console.log('--------------------');
});
inside a dedent block?
const description = dedent`
Date: ${req.body.date}
Alert ID: ${req.body.alert_id}
LOG ENTRIES
===========
< Execute loop here >
`;
Or does this need to be solved with a template engine? If, any suggestions how to implement it?