Call a function in a forEach loop

location = [];

this.Locations.forEach(
  (element) => {
     this.getSite();
  }
)

getSite()
{
  ...
}


const data =[]
{ 
  data: ...Location[1]     //<<<<<< hot to use ...
},
{
  data: ...Location[2]     //<<<<<<
}

Last updated