I tried to fetch names for each of "characters" from https://swapi.dev/api/films/1/ and then show it on page but my page render without nested fetch data.
As first Im fetching data from https://swapi.dev/api/films/1/ and then i mapping "characters" value, its array of urls and making axios for each of them, result push to array, when I console.log(array) array after it Im getting "value below was evaluated just now", when I JSON.stringify(array) console show me nothing

My code:
const getData = async () => {
try {
let array = [];
axios.get(`https://swapi.dev/api/films/1/`)
.then(firstData=>{
Promise.all(
firstData.data["characters"].map(url=>{
axios.get(url)
.then(character=>{
array.push(character.data.name);
})
})
).then(result=>{
console.log("array:",array);
JSON.stringify(array);
})
})
} catch (err ) {
// errors
console.log(err,"connection error")
}
}
useEffect(() => {
getData()
}, []);