When I try to work the second result into an object in legacy loops I get an empty array. Can anybody see why?
Secondly, does anybody know how to retain the keys in new loops as you can in legacy by editing the loop code;
const results = ;
for (const [index, value] of query37.data.entries()) {
const result = await query38_lambda.trigger();
results.push({
loop_result: result,
email:value.email,
invoice_id:value.invoice_id
})
}
return await Promise.all(results)
On the first line you have const results = ;
And then on line 4 you have results.push...
Results is not an array so you cannot push into it. So you should start with `const results =
It's possible you have other problems, but that is one of them. I would think you should have gotten an error in the debug console or somewhere.
I guess you deleted that previous post? It might be helpful to post some more screenshots to give us some more context.
When you say "work second result into an object", what does that mean?
Not sure about second part at all. You're looping over tracking numbers, checking some status and kicking off some apis. But what keys do you want to retain?