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

converting json to csv with keys and dictionary #35

Closed
hrc387 opened this issue Sep 24, 2020 · 1 comment
Closed

converting json to csv with keys and dictionary #35

hrc387 opened this issue Sep 24, 2020 · 1 comment

Comments

@hrc387
Copy link

hrc387 commented Sep 24, 2020

i am downloading an API from a website, download it as export.json. now i am trying to convert that to .csv but with only certain keys or dictionarys. i think its nested but not sure. see attached .json file. i want to convert only the fieldId8, fieldId9, and fieldId2 into the csv file.
Export.zip

@vinay20045
Copy link
Owner

Hi @hrc387,

You currently cannot filter out the fields from processing like how you are expecting.

However, I took a look at the file you have sent and I think you can get what you want by running the script with result as your node name. Like... python json_to_csv.py result Export.json Export.csv This gives a csv with 8 cols from which you can delete the cols you don't want. Output file Attached.
Export.csv.zip

I see a pull request #36 which seems to be trying to add this feature. I believe it warrants a discussion. You can follow that thread if interested.

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

No branches or pull requests

2 participants