📜  javascript 从 url 获取 json 文件 - Javascript 代码示例

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

代码示例2
let url = 'https://labtask87.s3.amazonaws.com/employeedata.json';

fetch(url)
.then(res => res.json())
.then((out) => {
  console.log('Checkout this JSON! ', out);
})
.catch(err => { throw err });