title: Node Discord.js Axios API Indexing
body: <p>I want to index through a list of items stored in a json file and call to each API and bring back data. The below code shows indexing/map working by building an API link, but how do I get the whole API call and message to be inside the indexing so each list item is called and returned by the API:</p>
  <pre><code>// {&quot;342671641006047252&quot;:[&quot;MSFT&quot;,&quot;AMZN&quot;,&quot;CVNA&quot;,&quot;TEAM&quot;]}
  console.log(list);
  
  // This is indexing through the list and bulding the link
  const tickers = list
    .map((ticker, index) =&gt; `https://financialmodelingprep.com/api/v3/quote/${ticker}?apikey=6c7ee1f3c7a666228979fa0678fa22a3`)
    return message.channel.send(tickers)
    
  // This is going to the api for list[0]
  axios.get('https://financialmodelingprep.com/api/v3/quote/'+list[0]+'?apikey=6c7ee1f3c7a666228979fa0678fa22a3').then(resp =&gt; {
  console.log(resp.data);
  let symbol = resp.data[0].symbol;
  let price = resp.data[0].price;
  let changesPercentage = resp.data[0].changesPercentage;
  return message.channel.send({embed: {
      color: 8311585,
      fields: [{
          name: &quot;Ticker&quot;,
          value: `${symbol}`,
          inline: &quot;true&quot;
        },
        {
          name: &quot;Price&quot;,
          value: `${price}`,
          inline: &quot;true&quot;
        },
        {
          name: &quot;Change %&quot;,
          value: `${changesPercentage}`,
          inline: &quot;true&quot;
        },
  </code></pre>