Hi. re-writed question to see if i have more luck with answers. Im stuck atm.
i have a forEach loop that reads a lot of records from Storage:
// load each record from Storage
this.idsAbiertasAll.forEach( (value, key, index) => {
this.storage.get('incidencia-'+value).then((data)=> {
let dataParsed = JSON.parse(data);
// update arrays
this.incidencias.push(dataParsed);
console.log('loaded '+dataParsed.id);
});
});
Question: how can i check that forEach has fully loaded all records from storage before continuing with code? help pls, im quite newbie with promises and async coding