Remove Double Quotes from Strings

JS
S
JavaScript

Demonstrates methods to strip double quotation marks from string values in various programming languages and contexts.

1// try to remove doublequotes
2const freshObject: any = {};
3Object.keys(csvRow).forEach((objK) => {
4  const sanitizedObjK = objK.replace(/"/g, '');
5  const sanitizedObjValue = csvRow[objK].replace(/"/g, '');
6  freshObject[sanitizedObjK] = sanitizedObjValue;
7});

Created on 12/18/2018