csvjson icon indicating copy to clipboard operation
csvjson copied to clipboard

When a string value contains a comma, it gets split into two values

Open Bathlamos opened this issue 6 years ago • 2 comments

e.g. "Invest in Tinder, Buzzfeed or Airbnb" will get detected as ""Invest in Tinder," and "Buzzfeed or Airbnb"

Bathlamos avatar Apr 03 '18 03:04 Bathlamos

Still happening.

flpelluz avatar May 31 '18 15:05 flpelluz

Same problem!

UPDATE: No, it works fine if you specify options: var options = { delimiter : ',', // optional quote : '"' // optional };

My csv data is exported from google sheets which only places quotes around a string if it contains commas. So my csv data contains mainly fields without quotes and a few with. Not specifying a quote in the options results in split strings as described but supplying one seems to work even if most fields are not quoted.

myleftshoe avatar Sep 10 '18 05:09 myleftshoe