Access properties of Javascript variable -
i want access specific properties of response object received request server.
getrespondersinrange: function() { this.$http.get('v1/responders?'.concat("latitude=" + this.latitude + "&longitude=" + this.longitude)).then(function(response) { this.responders = response.data["data"]; console.log(this.responders); }.bind(this)); }, the console.log returns this:
i want access field "userreference", can't find out how. tried:
console.log(this.responders["userreference"]console.log(this.responders.userreference
it returns array, try access property way:
this.responders[0]["userreference"]; 
Comments
Post a Comment