Given a JSON document below: "firstName": "John", "lastName": "Smith", "age": 25, "address": "street address": "21 2nd Street", "city": "New York", "state": "NY", "postal code": "10021" ). "phone number": "type": "home", "number": "212 555-1234"| ). "type": "fax", "number": "646 555-4567" The JavaScript variable customer refers to the JSON object above. The JavaScript code that retrieves a customer's state is _

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 5PE
icon
Related questions
Question
Question 25
Given a JSON document below:
"firstName": "John",
"lastName": "Smith".
"age": 25,
"address":
"street address": "21 2nd Street",
"city": "New York",
"state": "NY",
"postal code": "10021"
1.
"phone number":
[
{
"type": "home",
"number": "212 555-1234"
).
"type": "fax",
"number": "646 555-4567"
The JavaScript variable customer refers to the JSON object above. The JavaScript code that retrieves
a customer's state is
-------
Question 26
One way a web server responds to an asynchronous AJAX request is sending a JSON document
back to the client. To extract the JSON document in JavaScript, you may use the property of
the XMLHttpRequest object..
O responseXML
O responseJSON
O responseValue
O responseText
Transcribed Image Text:Question 25 Given a JSON document below: "firstName": "John", "lastName": "Smith". "age": 25, "address": "street address": "21 2nd Street", "city": "New York", "state": "NY", "postal code": "10021" 1. "phone number": [ { "type": "home", "number": "212 555-1234" ). "type": "fax", "number": "646 555-4567" The JavaScript variable customer refers to the JSON object above. The JavaScript code that retrieves a customer's state is ------- Question 26 One way a web server responds to an asynchronous AJAX request is sending a JSON document back to the client. To extract the JSON document in JavaScript, you may use the property of the XMLHttpRequest object.. O responseXML O responseJSON O responseValue O responseText
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning