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 need to get only the first record of a large CSV in JSON format.
The idea is to upload the file, parse the first record, get columns verified by the users (with sample data of first record), and then post approval finally process the records for insertion to a mongodb collection.
I'm using the below code to parse the first record:
I need to get only the first record of a large CSV in JSON format.
The idea is to upload the file, parse the first record, get columns verified by the users (with sample data of first record), and then post approval finally process the records for insertion to a mongodb collection.
I'm using the below code to parse the first record:
Now
console.log
is able to print the record, whereasreturn
gives me an empty object.What am I missing here?
I've also tried below to stop processing after the first record, to no avail:
The text was updated successfully, but these errors were encountered: