I've searched for a solution but I was not able to implement it.
async processMAC(macs){
let datos = [];
for(let x in macs){
await this.ipdataService.getMacsSaData(macs[x]).subscribe(data =>{
datos.push(data)
}
)}
return datos;
}
this.processMAC(macs).then(result => {//I want to work with result but it is undefined}