Hi, I’m a bit new to asynchronous function. Ideally, I’d like to have my users array be able to do all these moralis actions at the same time and then continue the code after all are complete.
//Is this right?
await users.map((user) => {
user.unset('gameId');
user.unset('playerId');
user.save(null, {useMasterKey:true});
});
//or this? or something else?
await users.map(async (user) => {
user.unset('gameId');
user.unset('playerId');
await user.save(null, {useMasterKey:true});
});