We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b87509 commit 3618883Copy full SHA for 3618883
lib/csv-2-json.js
@@ -69,8 +69,8 @@ var createDocument = function (keys, line) {
69
70
// Reduce the keys into a JSON document representing the given line
71
return _.reduce(keys, function (document, key) {
72
- // If there is no value (empty string) at the key's index in the line, set the value to null; otherwise the value
73
- val = !line[key.index] ? null : line[key.index];
+ // If there is a value at the key's index in the line, set the value; otherwise null
+ val = line[key.index] ? line[key.index] : null;
74
75
// If the value is an array representation, convert it
76
if (isArrayRepresentation(val)) {
0 commit comments