my use case is: Export a json-file from Keeper - extract data and save them in a csv-file.
I exported a json File form my password manager Keeper to a json file. I need to extract from each entry (>1.300) the "title", "login", "password" and "login_url" field from the (nested?) json file.
If login, password or login_url is missing or empty, it should also be extracted. My json file looks like this (first three entries shown):
{ "shared_folders": [], "records": [ { "uid": 1, "title": "title1", "notes": "note1", "$type": "login", "schema": [ "$login::1", "$password::1", "$url::1", "$fileRef::1", "$oneTimeCode::1" ], "login": "login1", "password": "password1", "login_url": "http:url1", "folders": [ { "folder": "Internet" } ] }, { "uid": 2, "title": "title2, "notes": "note2", "$type": "login", "schema": [ "$login::1", "$password::1", "$url::1", "$fileRef::1", "$oneTimeCode::1" ], "login": "login2", "password": "password2", "login_url": "http://url2" }, { "uid": 3, "title": "title3", "notes": "note3", "$type": "login", "schema": [ "$login::1", "$password::1", "$url::1", "$fileRef::1", "$oneTimeCode::1" ], "folders": [ { "folder": "Database" } ] }, Each entry in the json file should be extracted and saved in a csv-file.
The mapping structure must be:
- title = title
- login = username
- password = password
- login_url = url.
How can I set this up with a python script? Every help is welcome. Thank you very much. Sebastian
Источник: https://stackoverflow.com/questions/780 ... a-csv-file