title: What is the equivalent of this in JavaScript?
body: <pre><code>var stuff = $($(r).find(".BuyPriceBox")).find(".PurchaseButton").data();
  </code></pre>
  
  <p>r is the response from the AJAX call 
  r is the web page response. </p>
  
  <p>I want to write the above code in JavaScript, not using any jQuery, as node.js doesn't allow me to. </p>
  
  <p>I tried <code>document.getElementsByClassName("BuyPriceBox")</code> but I dont know how to do <code>.find</code> equivalent and get the data.</p>
  
  <hr>
  
  <p>Edit, Updated</p>
  
  <p>Here is what i tried </p>
  
  <pre><code>var parser = new DOMParser(); 
  var doc = parser.parseFromString(r, "text/html");    
  console.log(JSON.stringify(query(doc, ".BuyPriceBox .PurchaseButton").dataset))
  </code></pre>
  
  <p>Is that correct? because i just got an error : <code>'TypeError: Cannot read property 'toLowerCase' of undefined'</code></p>
  
  <p>This is what i have at the top.</p>
  
  <pre><code>var request = require("request"); 
  var DOMParser = require("xmldom").DOMParser; var query = require("queryselector"); 
  </code></pre>
  
  <p>also im getting the request like this. </p>
  
  <pre><code>request({ url: "roblox.com/A-Lucky-Presence-item?id=380201576";, method: 'GET' }, function(err, res, r) {
  </code></pre>
  
  <p>Also, how do i install the modules?</p>