You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to parse a csv into json. there is an attribute in csv "CONTENT" which contains data "£20" and after parsing it gives "£20" as json. My papa.parse setttings are as follow:
Papa.parse(createReadStream(filePath), { header: true, encoding: "utf-8", skipEmptyLines: true, beforeFirstChunk: function (chunk) { let stringIndex = chunk.indexOf("First Name"); if (stringIndex >= 1) { return chunk.slice(chunk.indexOf("First Name")); } }, chunk: function chunk(results, parser) { if (results.data.length > 0) { csvData.push(...results.data) } }, complete: function () { resolve(csvData); } });
I want that "£20" should came as it is £20 in the json object, or at least A£20 as simple text. Kindly help me out here, many thanks in advance.
The text was updated successfully, but these errors were encountered:
I am trying to parse a csv into json. there is an attribute in csv "CONTENT" which contains data "£20" and after parsing it gives "£20" as json. My papa.parse setttings are as follow:
Papa.parse(createReadStream(filePath), { header: true, encoding: "utf-8", skipEmptyLines: true, beforeFirstChunk: function (chunk) { let stringIndex = chunk.indexOf("First Name"); if (stringIndex >= 1) { return chunk.slice(chunk.indexOf("First Name")); } }, chunk: function chunk(results, parser) { if (results.data.length > 0) { csvData.push(...results.data) } }, complete: function () { resolve(csvData); } });
I want that "£20" should came as it is £20 in the json object, or at least A£20 as simple text. Kindly help me out here, many thanks in advance.
The text was updated successfully, but these errors were encountered: