example output: [EU Ecolabel (EU Flower),Cradle to Cradle (C2C) - Gold]
str.replace(/,/g, "||" ); works fine to replace the comma with a double-pipe symbol
I just cannot get the 2 brackets removed with: return str2.replace(/(\[|\]),/," ");
Any suggestions are welcome, thanks! HJ
function main(args, values) {
var str = inriverctx.GetExtraRelatedEntityFieldDisplayValue("Certification","CertificationName","","CertificationItems","0");
var str2 = str.replace(/,/g, "||" );
return str2.replace(/(\\[|\\]),/," ");
}