8000 Don't flat ObjectId's · Issue #175 · zemirco/json2csv · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Don't flat ObjectId's #175

Closed
pmvrmc opened this issue May 24, 2017 · 3 comments
Closed

Don't flat ObjectId's #175

pmvrmc opened this issue May 24, 2017 · 3 comments

Comments

@pmvrmc
Copy link
8000
pmvrmc commented May 24, 2017

Hello community,

What do you think about including and extra flag so that flatten won't flat an object if it is an ObjectId (from mongo)?

I'm having this issue where I pass a ObjectId to the csv export and it flattens it into smaller fields: _bsontype and id (with incomprehensible characters).

If you agree with this I can go forward and create the PR for it.

@knownasilya
Copy link
Collaborator
knownasilya commented May 24, 2017

Sounds reasonable, go for it. Actually, that might be a good default, no flag necessary.

@juanjoDiaz
Copy link
Collaborator

That pull request to the flat library should fix this issue if it get's accepted.

I'll submit shortly a PR to json2csv with the necessary change in this library.

@juanjoDiaz
Copy link
Collaborator
juanjoDiaz commented Sep 11, 2017

Btw, in the meantime, what I currently do is json2csv({ data: JSON.parse(JSON.stringify(myData)), flatten: true })
A bit hackish but do the job...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0