1

I did look for answers on other topic but can find the right answer. I have this promise :

console.log(getTheoryDb()) 

which log this: enter image description here

So far, so good...

My goal is to access to the Array of Elements which i can with this code below:

console.log(this.getTheoryDb().then(data => console.log(data.data.Properties.Elements)),err => console.log(err))

and the result is good as show below:

enter image description here

I want to store this array in a variable outside the scope of the promise, and this is where I am stuck... Someone to help me please ? Pretty new at code by the way..

Pierre Trzaska
  • 105
  • 1
  • 3
  • 9

0 Answers0