new Vue({
el:"#star-wars-people",
data:{
people: null
},
mounted: function(){
$.getJSON("http://swapi.co/api/people/", data => this.people = data.results);
}
})
Caution! Arrow functions are a syntax introduced in Ecmascript 2015. It is not yet supported but all modern browsers, so only use it if you are targetting a browser you know supports it, or if you are compiling your javascript down to ES5 syntax using something like babel.