1fetch('./yourjson.json')
2 .then((response) => response.json())
3 .then((data) => {
4 console.log(data);
5 })
1fetchJsonp('/users.jsonp')
2 .then(function(response) {
3 return response.json()
4 }).then(function(json) {
5 console.log('parsed json', json)
6 }).catch(function(ex) {
7 console.log('parsing failed', ex)
8 })