Sql is not going to help you here.I use SQLite for lots of things, but this is unlikely to be one of them! The data I am dealing with comes from a web API as a JSON array which gets converted directly into the Dictionary structure I have displayed. Even if I wanted to store the individual data pairs in a database (which I don't), I would still have to get them out of the Dictionary first!You probably want to use a database. I'd suggest SQLite is an ideal candidate.
Wherever you're getting that json from, you need to get the schema from them.
You open the root, loop through the items. Each of them should have data on its structure. Each item will be a new dictionary or a list of more dicts. Parse each different type. Do it again for inner items.
List comprehensions can make this easier, once you understand how to use them, but you will need to know the structure of the json. Can't get around that.
Such is the"beauty" of nosql. You can stick whatever you want in them, but you can't read stuff back out without first knowing hot to inspect each item.
Statistics: Posted by memjr — Tue Jan 14, 2025 3:46 am