title: How do I grab an object from a website using Javascript/Node.js?
body: <p>So let me first explain what I'm trying to achieve even though it's probably not the right way to go about this. </p>
  
  <p>I make discord bots and my goal is to have the bot check with the website before starting/running commands. I <em>(for obvious reasons)</em> don't want to put the true/false in the code in the event I need to stop a bot from starting remotely. </p>
  
  <p>I set something up on my <em>Express</em> app so that when the specific section of the response matches  the client ID in the array, then grab the piece from the response where it says true or false. Act on it if it doesn't and do nothing if the object is equal to true. I have this part down, however the part that I don't know how to do is access this "object" from the bot. </p>
  
  <p>Does anybody know how to do this? </p>
  
  <pre class="lang-js prettyprint-override"><code>app.get('/botAuthentication/getToken', (req, res) =&gt; {
      if(['7838193829389238'].includes(req.query.authorization)) {
  
              res.status(200)
              res.send({
                  botAuth: true
              })
  
      } else {
          return res
              .status(401)
              .send( { code: 401, message: "You can't view this page."})
      }
  });
  </code></pre>
  
  <p>This code returns the shown object when opened in the browser. </p>
  
  <p>TLDR; How do I grab that object from the website using some sort of library or method? </p>
  
  <p><em>I know this might not be the proper way to do this; I am new to web development.</em></p>
  
  <p><strong>Thank you in advance!</strong></p>