When I retrieve a row from a table on the UI, it shows only one row. Here are the values from the UI table displayed on my console:
[ ' 0',
'ALPHA NUMERIC(100)\nPG_8_2670\nSt.Athens.,Pt\n1062645\nAutomation-if add row is editable\nALPHA NUMERIC(20)\nTIMESTAMP(19)\nYYYY-MM-DD(19)\n0' ]
My objective now is to convert the above result into the format shown below.
[ ' 0','ALPHA NUMERIC(100)','PG_8_2670','St.Athens.,Pt','1062645','Automation-if add row is editable','ALPHA NUMERIC(20)','TIMESTAMP(19)','YYYY-MM-DD(19)','0' ]
The issue I am encountering involves the comma in 'St.Athens.,Pt'
. I've tried the code below, but it hasn't resolved the problem:
client.getText(obj.table.addedRow,function(err, values) {
console.log('Values before changes:',values);
var str = values.toString();
str = str.replace(/\n/g,",");
var values = str.split(',').toString();
console.log('Values from table of empty row post changes:',values);