Using Python 3, I want to download the API data, which has been returned as JSON, and then I only want to include specific (especially). Column or field or whatever?) In a simlight database. Therefore, I have problems with me here and I have:
Using the Python Request module:
jason.loads (r.text)
Then I create the table in which I want to insert specific data:
curs.execute ('' Creating Tablet Data (Loan is not an Instider, Note AMRX is not real '' '')
No problem But now, even if JSON data looks something like this (although there are hundreds of records) ...
{"myNotes": [{"loanId": 11111, "note id" : 22222, "Order ID": 33333, "Purpose": "Debt Consolidation", "Cabarted": True, "A "Credit Card Refinance", "Canberbed": "Christian Credit": 12.1, "Principal Pending": 20.94, "Credit Card Refinance", "Redirected": "Down", "Loan Amount": 10800, "Note Amount": 25, "Received Payment": 5.88 ",", "Loan ID": "11111," Note ID: 22222, "Order ID": 33333, "Objective" "Credit-Tired": "UP", "Loan Amount": 3000, "Note Amount": 25, Payment Received ": 7.65," Acquired Interest ": 11.92," Prosperation ": 19.76,}]
>I only call data points to the SQLite database," Loan ID "and "note Mount "would like to join. I believe that something like that will appear in the database (but it is wrong to know):
curs.execute ('INSERT data (loan, note amount) value (?,?) ', (LONID, note amount))
But I am now about a complete loss of how to do this, so I think I have two main issues Are; Getting downloaded data into something so that Python can use to insert specific data into the database; And then how do I insert the data from the database from the object that holds the downloaded data? I'm guessing looping is part of the answer ... but from what? thank you in advanced!