Bird
0
0

Given this API response:

medium📝 Predict Output Q4 of 15
Rest API - REST API Fundamentals
Given this API response:
{"status":200,"message":"Success","data":{"id":5,"name":"John"}}

What is the value of the 'name' field?
AJohn
B5
CSuccess
D200
Step-by-Step Solution
Solution:
  1. Step 1: Locate the 'name' field in the JSON response

    The 'name' field is inside the 'data' object with value "John".
  2. Step 2: Identify the correct value for 'name'

    From the JSON, 'name' equals "John".
  3. Final Answer:

    John -> Option A
  4. Quick Check:

    Value of 'name' = John [OK]
Quick Trick: Look inside 'data' object for nested values [OK]
Common Mistakes:
  • Confusing status code with data values
  • Selecting message instead of name
  • Reading id as name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes