title: How to access the data from a promise which is an object property
body: <p>I have the following array of objects</p>
  <pre><code>const people = [
    {
  id:'John:1:Aries',
  exp:40.3,
  scores: [4, 4, 5, 6, 4, 6, 5],
  futureScores:Promise.resolve([5, 5, 6]),
    },
    {
  id:'Jane:2:Pisces',
  exp:57.6,
  scores: [6, 5, 6, 6, 4, 5, 6],
  futureScores:Promise.resolve([4, 5, 6]),
    },
    {
  id:'Tom:3:Leo',
  exp:30.3,
  scores: [4, 4, 5, 5, 6, 6],
  futureScores:Promise.resolve([4, 4, 6]),
    },
    {
  id:'Amy:4:Sagittarius',
  exp:35.0,
  scores: [6, 6, 6, 6, 6, 5],
  futureScores:Promise.resolve([6, 5, 6]),
    },
  ];
  const extractId = (people) =&gt; {
  return people.filter((person) =&gt; {
      const id = person.id;
      if(id.includes(&quot;a&quot;)){
        return person;
      }
  })
  
  }
  const scores = extractId(people);
  const avg = (scores) =&gt; {
    const getavg = scores.map((el) =&gt; el.scores.reduce((a,b) =&gt; a +b , 0)/el.scores.length);
    const allavg = getavg.reduce((a, b) =&gt; a+b/getavg.length, 0)
  return allavg;
    }
  </code></pre>
  <p>I want to access the futureScores property and record the scores in another variable
  Tried the following</p>
  <pre><code>const future = (scores) =&gt; {
    const arr = [];
    const fscore = scores.map((el) =&gt; {
        
       const fscores = el.futureScores;
      const result = fscores.then(function(value){
        
        console.log(value);
        arr.concat.value;
      });
      return  result
    })
    
    return fscore;
  }
  console.log(future(scores));
  </code></pre>
  <p>The first console.log is outputting the scores but console.log(future(scores)) is outputting [ Promise {  }, Promise {  } ]
  What am I doing wrong?</p>