title: How do I loop through a json array, and then display the results in an discord js embed?
body: <p>Thanks for taking a peek at my question. This is my first question, so hopefully I do all the right stuff.</p>
  
  <p>I am using DiscordJS/NodeJS</p>
  
  <p>I have a large(ish) json file that has a list of maps/links to download the map, and an extra field. </p>
  
  <pre><code>[
    {
      "name": "2 Evil Eyes",
      "link": "http://",
      "extra": ""
    },
    {
      "name": "25 To Life",
      "link": "http://",
      "extra": ""
    },
    {
      "name": "Back To School",
      "link": "http://",
      "extra": ""
    },
  </code></pre>
  
  <p>I created this file myself from a list that was given to me. </p>
  
  <p>The goal of this file was to be able to display the data (maps, link, extra) in a discord embed. I know that having 70+ .addField(s) is not a great idea, but it is what was requested.</p>
  
  <p>So I thought that I would just have a little loop through and display the data that way, but my issue is that it keeps posting an embed for each result it gets. Here is my code below:</p>
  
  <pre><code>fs.readFile('./maps.json', 'utf-8', function(err, data){
          json = JSON.parse(data);
          for(let i = 0; i &lt; data.length; i++){
              let name = data[i].name;
              let link = data[i].link;
              let extra = data[i].extra;
  
          }
          const mapRot = new Discord.MessageEmbed()
              .setTitle("Map Details")
              .setAuthor(client.user.username)
              .setDescription("These are your maps for the night.")
              .addField("Maps", name)
              .addField("Link", link)
              .addField("Extra", extra);
  
          message.channel.send(mapRot);
  </code></pre>
  
  <p>Any help would be appreciated!</p>