I do a lot of requests to api. What i need is to return only fulfilled promises, so i can use them after, with json() function. After some googling i have this code right now and it's seems like doesn't work. What is the correct way of doing so?
async function requestAPI(items) {
var requests = items.map(item => fetch(url).catch(e => e))
return Promise.all(requests);
}
getUrls()
.then(result => requestAPI(result))
.then(result => Promise.all(result.map(v => v.json())))