fetch("/") .then(response => response.json()) .then(json => { this.restaurants = json; console.log(this.restaurants.length) })