📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Consider the following JSON object: json

      {   "user": {     "id": "u123",     "name": "Alice",     "age": 30,     "address": {       "street": "123 Main St",       "city": "Anytown"     }   },   "products": [     {"id": 1, "name": "Laptop", "price": 1200},     {"id": 2, "name": "Mouse", "price": 25}   ] } If this JSON is loaded into a Python dictionary json_obj, what would be the value of json_obj["user"]["address"]["city"]?
      A "Alice" Correct Answer Incorrect Answer
      B 30 Correct Answer Incorrect Answer
      C "123 Main St" Correct Answer Incorrect Answer
      D "Anytown" Correct Answer Incorrect Answer
      E 1200 Correct Answer Incorrect Answer

      Solution

      The correct answer is D

      Practice Next
      ask-question