-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unparse skips columns #609
Comments
Here's a thought: maybe Papa could make a first pass to determine what the columns should be and then a second one to grab all the data? |
I don't think we should double pass the results as this will be a performance issue but you may probably do it before passing the values to paparse. This way you can perform any additional checks or whatever you need. Do you have some suggestion about how to improve the unparse of empty values? For me the current behavior is correct. |
I would suggest we add a config variable for unparse called something like Thoughts? |
I agree with @pokoli that this is something that should happen outside of this library. I think the |
Makes sense. The resulting header row can be edited afterwards easily enough anyway. |
Flagging this as a feature ready for contribution! Help wanted summary:
How to contributehttps://github.com/mholt/PapaParse#contributing |
Fixed on #632 |
Looks like unparsing a JSON array ends up in missing columns if the first
Object
in the array is missing properties that otherObject
s in the sameArray
do have.This
Array
is correctly turned into CSV:This is the output:
Now, if you
sort
that array so the oldest entry (the one withoutmetadata_customerEmail
) is atindex
0, then you end up with this CSV:The text was updated successfully, but these errors were encountered: