Bird
0
0

Given this webhook payload JSON: {"event":"order_placed","data":{"order_id":789,"amount":150}}, what will a receiver see if it extracts data.amount?

medium📝 Predict Output Q4 of 15
Rest API - Webhooks and Events
Given this webhook payload JSON: {"event":"order_placed","data":{"order_id":789,"amount":150}}, what will a receiver see if it extracts data.amount?
A"150"
B150
Corder_placed
D789
Step-by-Step Solution
Solution:
  1. Step 1: Locate the amount value in the payload

    Amount is inside data object as a number 150.
  2. Step 2: Extract data.amount value

    Extracting data.amount returns the number 150, not a string.
  3. Final Answer:

    150 -> Option B
  4. Quick Check:

    Extracted amount value = 150 [OK]
Quick Trick: Numbers in JSON are unquoted, strings are quoted [OK]
Common Mistakes:
MISTAKES
  • Confusing number 150 with string "150"
  • Extracting wrong key like event or order_id
  • Assuming amount is a string

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes