Open mahyuan opened 5 years ago
let arr = [{ id: 11, name: 'name1', age: 22 }, { id: 23, name: 'name1', age: 22 }, { id: 29, name: 'name1', age: 22 }] async getEveryDetail() { if (arr.length > 0) { for (const [index, value] of arr.entries()) { let res = await fetch(value.id) value.info = res.data.info } } }