I have an array of objects called searchResults. I am trying to display only the object based on the index that is clicked.
Polymer({
properties: {
data: {
type: JSON,
value: [],
observer: 'markerClicked'
},
selectedRetailer: {
type: Number,
value: 0,
}
},
markerClicked: function(e) {
this.selectedRetailer += 1;
}
})
The code above is not functioning as expected and I'm unsure why.
Essentially, I want to use selectedReatailer as the index for the array. How can I achieve this?
Thanks