I am having some data which is facing issue while exporting to csv if the data contains "," with in it.
Hereis the code:
CSVData.push('"' + item.OrgId+ '","' + item.Name + '","' + item.OrgDescriptionString + '","' + itam.OrgDetailsString + '","' + item.Active+ '"');
if orgDetaisl string contains "," with in it, the data is getting overlapped and moving to next column.
How to escape "," .I tried using double quotes """ but not sure how can i achieve.
CSVData.push('"' + item.OrgId+ '","' + item.Name + '","\""' + item.OrgDescriptionString + '"\"","\""' + item.OrgDetailsString + ' \"","' + item.Active+ '"');
Please correct the string and help me to escape "," with in the data.