How to use the loop function to solve my data issue

Hey @Sander!

This thread convers something similar, I wonder if _.chunk and await might be useful for you as well :thinking:

Could something like this work?

const batches = _.chunk(getean.data, batchSize);
const fullDataSet = [];
for(let eanValues of batches){
  const promises = eanValues.map(/* trigger queries */);
  const results = await Promise.all(promises);
  fullDataSet.push(...results.flat());
}

return fullDataSet;

You might also explore using a loop block here!