//SWAPI Links { async function jsonTable (obj){ for(let el in obj){ if(Array.isArray(obj[el])){ let i = 0 for(let elArr of obj[el]){ async function btn (link){ return fetch(link) .then(res => res.json()) .then(luke => obj[el][i]=luke) } if(elArr.indexOf("https://swapi.dev")!== -1){ await btn(elArr) } i++ } } if(obj[el].indexOf("https://swapi.dev")!== -1){ fetch(obj[el]) .then(res => res.json()) .then(luke => obj[el]=luke) } } console.log(obj) } fetch('https://swapi.dev/api/people/20') .then(res => res.json()) .then(luke =>jsonTable(luke)) }