How to iterate over a json object in Python?

How to iterate over a json object in Python?

I have a json object contaning currencies as listed below which I need to convert it into my model and save it into the DB. Also is there a way to save the list of models in one go?

I have a json object contaning currencies as listed below which I need to convert it into my model and save it into the DB. Also is there a way to save the list of models in one go?

   {
  "results": {
    "ALL": {
      "currencyName": "Albanian Lek",
      "currencySymbol": "Lek",
      "id": "ALL"
    },
    "KWD": {
      "currencyName": "Kuwaiti Dinar",
      "id": "KWD"
    },
    "LSL": {
      "currencyName": "Lesotho Loti",
      "id": "LSL"
    },
    "MYR": {
      "currencyName": "Malaysian Ringgit",
      "currencySymbol": "RM",
      "id": "MYR"
    },
    "MUR": {
      "currencyName": "Mauritian Rupee",
      "currencySymbol": "₨",
      "id": "MUR"
    }
  }
}

I tried this :

for key,value in currencies.results :
                #print(currency)
                #print(value)   

However, I get the following error :

"Too many attribures to unpack, expected 2

Can someone help me with this?

django python

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Python Django Tutorial | Django Course

🔥Intellipaat Django course: https://intellipaat.com/python-django-training/ 👉This Python Django tutorial will help you learn what is django web development &...

Basic Data Types in Python | Python Web Development For Beginners

In the programming world, Data types play an important role. Each Variable is stored in different data types and responsible for various functions. Python had two different objects, and They are mutable and immutable objects.

Main Pros and Cons of Django As A Web Framework for Python Developers

India's best Institute for Django Online Training Course & Certification. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Hire Python Developers

Are you looking for experienced, reliable, and qualified Python developers? If yes, you have reached the right place. At **[HourlyDeveloper.io](https://hourlydeveloper.io/ "HourlyDeveloper.io")**, our full-stack Python development services...