Skip to content
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

Column filter #50

Closed
hodiapa opened this issue Jun 19, 2015 · 3 comments
Closed

Column filter #50

hodiapa opened this issue Jun 19, 2015 · 3 comments
Milestone

Comments

@hodiapa
Copy link

hodiapa commented Jun 19, 2015

How to filter only a desired set of columns during CSV to JSON conversion.
So I have columnA, columnB, ColumnC.
And I would like to display only ColumncC in the JSON file.

How to go about it.

Raising an issue as I didn't find any mailing list. Thanks~

@Keyang
Copy link
Owner

Keyang commented Jun 21, 2015

use omit parser to exclude the column you do not want.
see here : https://github.com/Keyang/node-csvtojson#default-parsers
so in your CSV header you will have
omitcolumnA, omitcolumnB, ColumnC
Does this solve your problem?

~Keyang

@hodiapa
Copy link
Author

hodiapa commented Jun 21, 2015

Is there a way to do this using the csvtojson api rather than manually changing the header row? If not this could be a very good feature enhancement to have to the library

@Keyang
Copy link
Owner

Keyang commented Jun 21, 2015

True. I will add this in road map.
Thanks for the suggestion.

~Keyang

@Keyang Keyang added this to the 0.4.1 milestone Jun 24, 2015
@Keyang Keyang modified the milestones: 0.4.3, 0.4.1 Sep 2, 2015
Keyang added a commit that referenced this issue Sep 23, 2015
@Keyang Keyang closed this as completed Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants