title: Issues trying to check a couple of RSS feeds (from a JSON config file) in Node.JS (using rss-parser)
body: <p>I'm currently trying to make a node.js script to read a couple of RSS feeds from a JSON file (<code>config.json</code>), check everyone and send new items to it's specific webhook for Discord.</p>
  <p>The config file is the following:</p>
  <pre class="lang-json prettyprint-override"><code>[
    {
      &quot;name&quot;: &quot;r/aww&quot;,
      &quot;avatar&quot;: &quot;https://example.com/avatar.jpg&quot;,
      &quot;rss_url&quot;: &quot;https://www.reddit.com/r/aww/top/.rss&quot;,
      &quot;webhook_url&quot;: &quot;https://discord.com/api/webhooks/...&quot;
    },
    {
      &quot;name&quot;: &quot;r/ImaginaryLandscapes&quot;,
      &quot;avatar&quot;: &quot;https://example.com/avatar.jpg&quot;,
      &quot;rss_url&quot;: &quot;https://www.reddit.com/r/ImaginaryLandscapes/top/.rss&quot;,
      &quot;webhook_url&quot;: &quot;https://discord.com/api/webhooks/...&quot;
    }
  ]
  </code></pre>
  <p>And the code that i attempted to do, following sync examples from <a href="https://www.npmjs.com/package/rss-parser" rel="nofollow noreferrer">rss-parser npm package</a>, is the following:</p>
  <pre class="lang-js prettyprint-override"><code>let Parser = require('rss-parser');
  
  let parser = new Parser();
  
  const config = require(&quot;./config.json&quot;);
  
  config.forEach(element =&gt; {
      
      parser.parseURL(element.rss_url, function(err, feed) {
        console.log(feed);
  
        feed.items.forEach(function(entry) {
          console.log(entry.title + ':' + entry.link);
        });
      });
  
  });
  </code></pre>
  <p>But trying to run it throws the following error:</p>
  <pre><code>undefined
  /mnt/d/misc/feedchecker/script.js:28
            feed.items.forEach(function(entry) {
                 ^
  
  TypeError: Cannot read property 'items' of undefined
      at /mnt/d/misc/feedchecker/script.js:28:9
      at Timeout.setTimeout [as _onTimeout] (/mnt/d/misc/feedchecker/node_modules/rss-parser/lib/utils.js:63:29)
      at ontimeout (timers.js:436:11)
      at tryOnTimeout (timers.js:300:5)
      at listOnTimeout (timers.js:263:5)
      at Timer.processTimers (timers.js:223:10)
  </code></pre>
  <p>What I'm doing wrong on this code? Please note that i still didn't wrote the webhook sending part, I'm focused still on fetching the feeds first.</p>