[Vuejs]-Changing object variable address in function

2👍

To read, you should use the accessor (bracket) notation directly, without a . before:

defineSpeciality(parameter) {
  for (var i=0; i < this.readyOffer[parameter].length; i++) {        // changed this line
    output = output + this.readyOffer[parameter][i].name + ', '      // changed this line
  }
  return output
},

Reference/recommended reading: MDN – Property Accessors.

Leave a comment