así que estoy tratando de obtener algunos datos para el lado del cliente, pero llegan vacíos, ya que cada vez que trato de obtener los datos devueltos por la búsqueda, me da la Promesa {}.
Además, esta función de mapa asíncrono está dentro de otra función asíncrona llamada predeterminada, si eso ayuda.
async function default(){ const result = last10Matches.map(async (match) => { const matchurl = `https://api.pubg.com/shards/${playerPlatform}/matches/${match.id}`; const matchresponse = await fetch(matchurl, options); const matchdata = await matchresponse.json(); matchdata.included.forEach((player) => { if ( player.type == 'participant' && player.attributes.stats.name == playerName ) { playerRecentStats.push({ kills: player.attributes.stats.kills, dmgDone: player.attributes.stats.damageDealt, knocks: player.attributes.stats.DBNOs, date: matchdata.data.attributes.createdAt, }); } }); // console.log(playerRecentStats); // This does log the correct data here. return playerRecentStats; }); console.log(result); // This here returns Promise { <pending> } /* // i Also tried this below. with an empty result whatsoever. async () => { console.log(await result); }; */ }Gracias por adelantado