How to access data in resolved Promise in JavaScript?


I am working with promises for the first time. I want to get data(array) from 2 different end points. Below is code I have come up with so far. My console output shows [Promise, Promise] both are in resolved status. I can also see the response data that I need but I don't know how to access them. How can I get the data array from the promise? Thank you

Promise output in console

0: Promise
[[PromiseStatus]]: "resolved"
[[PromiseValue]]: "Object"
  data: {room 18: {...}, room 19: {...}, room20: {...}} // this is what I need 

1: Promise
[[PromiseStatus]]: "resolved"
[[PromiseValue]]: "Object"
  data: {room 18: {...},  room 19: {...}, room20: {...}} // this is what I need
const urls = ['/room/*/userconfig', '/room/*/observation/latest']; 
        let requests = urls.map(url => axios.get(url)); 

        Promise.all([requests])
            .then(res => res.map(response =>  console.log(response) // create 1 array and match roomId data))


The requests array should not be inside another array when passed to Promise.all

let requests = urls.map(url => axios.get(url)); 

Promise.all(requests)
  .then(res => res.map(response =>  console.log(response));

Your data should already come as one array within the then callback:

var promises = [
  new Promise((resolve, reject) => { setTimeout(() => resolve("Hello"), 1000);}),
  new Promise((resolve, reject) => { setTimeout(() => resolve("world !"), 1500);})
];

Promise
  .all(promises)
  .then(results => {
    let mergedResults = results[0] + " " + results[1];
    console.log(mergedResults);
    document.body.innerHTML = mergedResults;
  });