title: im not able to get top post titles in a subreddit reddit api
body: <p>im making a discord bot that displays the top post on the r/worldnews subreddit but i don't know how to get the title for the top post because its in a json array (I think)
  basically I need the title of the top post as a javascript variable.</p>
  <p>heres my code</p>
  <pre><code>
  
  if (message.content.startsWith(`${prefix} 1`)){
      console.log('promted') 
      const https = require('https');
  https.get('https://www.reddit.com/r/worldnews/top.json', (resp) =&gt; {
    let data = '';
  
    // A chunk of data has been recieved.
    resp.on('data', (chunk) =&gt; {
      data += chunk;
    });
  
    // The whole response has been received. Print out the result.
    resp.on('end', () =&gt; {
        
      console.log(JSON.parse(data).explanation);
      const {title} = JSON.parse(data);
  
  
  
    message.channel.send(title)
  
  // message.channel.send(data[0].country_code);
  
  
    });
  
  }).on(&quot;error&quot;, (err) =&gt; {
    console.log(&quot;Error: &quot; + err.message);
  }
  )}
  
  </code></pre>