Answers for "use of .json() in javascript"

1

use of .json() in javascript

fetch('http://example.com/movies.json')
  .then(response => response.json())
  .then(data => console.log(data));
//Since the HTTP response is not a JSON Object, 
//.json() extracts the JSON Object from the HTTP response
Posted by: Guest on June-25-2021

Code answers related to "use of .json() in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language