📜  在 javascript 代码示例中使用 .json()

📅  最后修改于: 2022-03-11 15:03:47.253000             🧑  作者: Mango

代码示例1
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