I am doing some computations inside a double forEach Loop something like this:
forEach
array.forEach(function(element){ Object.keys(element).forEach
let dataObject = {}; Promise.all(objectArray.map(object => { return new Promise(resolve => { yourFunction(object, anotherParameter).then(returnValue => { dataObject[object] = returnValue; resolve(); }); }); })).then(() => { return dataObject; });