title: Javascript accessing array and displaying its items
body: <p>i have a JSON formatted data here: <a href="https://xnia140ixg.execute-api.us-east-1.amazonaws.com/Stage1/currencies" rel="nofollow noreferrer">https://xnia140ixg.execute-api.us-east-1.amazonaws.com/Stage1/currencies</a></p>
  <p>And i want to display it in a graph. I wrote that code</p>
  <pre><code>let CurrData = [];
          let res = axios.get('https://xnia140ixg.execute-api.us-east-1.amazonaws.com/Stage1/currencies').then(Response =&gt; {
              let data = Response.data.Items
              console.log(data);
  
              CurrData.push(data);
          });
  </code></pre>
  <p>What im trying to do is to push that data into new array that i could access outside this method and then iterate through each of the item. But i cant manage to do that. Thats what im getting now
  <a href="https://i.stack.imgur.com/2jj7z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2jj7z.png" alt="Array" /></a></p>
  <p>What i want to do now is access Price and PriceTimeStamp and put it in plotly.js object, like this:</p>
  <pre><code>CurrData.forEach(Curr =&gt; {
              //Specify how chart should be drawn
              let trace = {
                  x: Curr.Price,
                  y: Curr.PriceTimeStamp,
                  mode: 'line',
                  name: Curr.Currency,
                  marker: {
                      color: 'rgb(219, 64, 82)',
                      size: 12
                  }
              };
  </code></pre>
  <p>What should i change?</p>