Я пытаюсь получить значения из массива обещаний.
async function retrieveIssues() {
let rawdata = fs.readFileSync(argv.i);
let issues = JSON.parse(rawdata);
const issuesArray = issues.Issues;
const promises = issuesArray.map(issue => getIssueInfo(issue));
await Promise.all(promises);
// promises is now array of current issue information
console.log(promises)
console.log(promises[0])
}
Итак, у меня есть массив объектов Promise, которые выглядят так:
Promise {
{ title: 'Work out why we can\'t run the GAX tests with parallelism',
body: 'We\'ve had to disable parallelism in GAX tests, as otherwise the FakeScheduler tests hang, although only on Travis... but it\'s not clear why. At some point, we should investigate that...\n',
labels: [ [Object] ] } }
Так, как я могу получить доступ к названию, например?