-
Notifications
You must be signed in to change notification settings - Fork 268
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
Parse dot notation columns into nested objects #414
Comments
The closest thing is the column option but it doesnt support (yet?) nested column. |
+1 to this, this would be a great feature. In the archived repo, this was requested here: adaltas/node-csv-parse#76. And I came here to make a similar suggestion. I'm rolling my own simple version right now but if this was part of the library, even better. I think the argument for it is that csv-stringify offers this nested properties behavior when outputting, so being able to read that format when parsing (enabling a "round trip") is desirable. |
Yes, I remember a few years back porting the underscore code into the library to support this feature without including an external dependency. A little buzy in the next copple of weeks between work and then holidays but I'll try to find the time. |
In case it helps as a starting point, my implementation was something like the below (I've edited it a bit to remove project-specific things, so it may no longer compile). NestedKeyVal was a custom type that is supposed to represent a possibly nested string-keyed object.
|
I want to be able to write my column names with dot notation, like this:
The parsing should result in this:
I dont know if it's already possible and I just dont understand how to do it.
The text was updated successfully, but these errors were encountered: