My OutPut Variable in VRO has this data in single line.
like this
aaaaaa.bbbbbbb.ccccc.ddddd
i want to format that and keep it on different lines like this and sent email.vro
aaaaa
bbbbb
ccccc
dddd
how to format the variable which has this data in javascript ?
Hi,
Check the following snippet which shows how all dot characters ('.') in a string can be replaced with newline characters ('\n').
var x = "aaaaaa.bbbbbbb.ccccc.ddddd";
System.log("original value: " + x);
var y = x.replace(/\./g, "\n");
System.log("formatted value: " + y);
If you're sending a HTML email (as opposed to text) you'll want to replace them with <br /> and not the newline character.
const body = myVar.replace(/\./g, '<br />');