-
Notifications
You must be signed in to change notification settings - Fork 362
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
Adding "unwindPath" option that enables data transformation prior to … #140
Conversation
…writing CSV similar to MongoDB's $unwind operation
var fs = require('fs'); | ||
var fields = ['carModel', 'price', 'colors']; | ||
var myCars = [ | ||
{ "carModel": "Audi", "price": 0, "colors": ["blue","green","yellow"] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing that needs a fixup is the formatting on this array, and the extra spaces between fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Along with quotes. Basically match the other example code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will make the change!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, pushed the change.
Related Issue: #139 |
I would like to review the PR since I started the conversation, however it won't be possible till next Monday. If this is too much delay feel free to go ahead and continue without me. Otherwise would be good if you can leave it opened so I can also test it. |
No problem |
@dciccale, did you have a chance to take a look yet? |
I'll be merging this tomorrow, so let me know. |
yes, looks good! |
Released as v3.7.0 |
Awesome, thanks guys! |
…writing CSV similar to MongoDB's $unwind operation
I've leveraged Lodash's cloneDeep function to minimize the amount of code change but it's slightly inefficient. Let me know what you think!