title: Send JavaScript Array to webhook
body: <p>I am trying to get data from an API, push the fetched data to an array and then send (post) that array with the data in a webhook. I tried <code>description: data,</code>, but it doesn't work. Can someone help me or is it even possible with js?</p>
  <pre><code>const api = &quot;http://ip-api.com/json/&quot;
  
      var ipinfo = [
  
      ]
  
      async function getIP() {
          const response = await fetch (api)
          const data = await response.json();
          const { city, zip, country, countryCode, lat, lon, org, query, region, regionname, timezone } = data;
  
          ipinfo.push(data);
          console.log(ipinfo)
      }
  
      getIP();
  
      
      function sendMessage() {
          fetch(
              'WEBHOOK URL', {
                  method: 'post',
                  headers: {
                      'Content-Type': 'application/json',
                  },
                  body: JSON.stringify ({
                      allowed_mentions: {
                          parse: ['users', 'roles'],
                  },
                  // embeds to be sent
                  embeds: [{
                      title: 'New IP logged',
                      description: &quot;ipinfo&quot; + ipinfo,
                      },
                  ],
                  }),
              }
          );
      }
  </code></pre>