-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] TypeError: csvToJson.indexHeader is not a function #39
Comments
So happy to see this issue has already been reported. I am facing the same issue. |
Luckily import csv from 'convert-csv-to-json'
# Assign indexHeader first
csv.indexHeader = 5
# Then call ...
var json = csv
.fieldDelimiter(',')
.supportQuotedField(true)
.getJsonFromCsv(file) |
This workaround also not work. In my case forst file header row is 1 and second file header row is 3. Please fix this issue asap. |
@babup2211 or anyone, if you want this fix, please do the review for PR #40. |
Expected Behavior
Should not throw error.
Actual Behavior
Steps to Reproduce the Problem
Specifications
PS
Seems the issue arise from csvToJson.js:
Ln27:
indexHeader(indexHeader)
...Ln31:
this.indexHeader = indexHeader;
The text was updated successfully, but these errors were encountered: