Skip to content

Tag: json

Writing a List of Dictionaries to seperate JSONs

I do have dictionary, with each value as a list. I want to write individual items to separate JSON files. For example Now I want 3 jsons i.e data1.jsob, data2.json, data3.json in the following(approx) format. data1.json data2.json and so on. My current approach is But this is wrong. Any helps appreciated. Ans…

Adding and saving to list in external json file

I’m very new to Python and I’m struggling when it comes to saving the data that the user has entered to a json file when quitting the application. Also every time I run my code all the data inside the json file is wiped. When I enter the input to save and exit I get this error code: Here is

Extract data from json in these format

I’ve been messing around with JSON for some time, just pushing it out as text and it hasn’t hurt anybody (that I know of), but I’d like to start doing things properly. this is my code : this is my json file: my output is these: I want output like in these format as you have shown in the pic

How do I extract all keys from this JSON file?

The data I’m working with is the entire list of yugioh cards, found at this endpoint: https://db.ygoprodeck.com/api/v7/cardinfo.php There’s a top-level data node that I can ignore, but each sub-node immediately after that (0, 1, 2,…) is a unique card in the cardset. I want to find out how ma…

How do i remove a specific json value in python?

I’m making a playlist website that can create display and delete playlists and songs. I’m using a JSON file to store the data. The only feature that isn’t working is the delete song feature. This is my JSON file I’m using the ID of the playlist and the index of the song to locate it in…