I have a array of objects called listData that I would like to call certain information from into a separate called markers.
var markers = [];
for(let i=0;i<listData.length;i++){
markers.push({
latitude:this.state.listData[i].geometry.location.lat,
longitude:this.state.listData[i].geometry.location.lng,
title:this.state.listData[i].name
});
}
but it is not working.