title: Pulling a value from request.get
body: <p>So I want to pull a value from the request.get in node.js from a web api. I can work with the data within the request.get funtion but I want to pull it out into a variable and that doesn't seem to be working.</p>
  
  <pre><code>var Request = require("request");
  var variable;
  
  variable = Request.get(url, (error, response, body) =&gt; {
      if(error) {
          return console.dir(error);
      }
      var object = JSON.parse(body);
      var value = object[1];
  
      return value;
  });
  </code></pre>
  
  <p>Any advice?</p>