the array:
const dummyArray = [
{
id: 1,
name: 'abc'
},
{
id: 2,
name: 'def'
},
{
id: 3,
name: 'ghi'
},
{
id: 4,
name: 'jkl'
}
];
I want to make two async calls on each object.
Anyone have any idea about this?
await Promise.all(dumbArray.map(async item => await item.call()));
@MKRhere can Promise.object do that?
Promise.all( dummyArray .map(x => firstAsyncCall(x) .then(secondAsyncCall)));
Обсуждают сегодня