title: MongoDB Query to JSON Object error : Unexpected token u in JSON at position 0
body: <p>I'm trying to return a MongoDB Query as a JSON Object so it can be stored in a javascript variable and used as need. I have the query executing fine but I can't get it to store as a JSON object and I keep getting this error <strong>Unexpected token u in JSON at position 0</strong>. I've looked it up and seen other people having this problem but I tried their solutions and I couldn't get it to work. Please help me.</p>
  
  <p>Here's the user.js model code:</p>
  
  <pre><code>module.exports.example = function() {
      var query = User.find({}).lean().exec(function (err, users) {
          return JSON.stringify(users);
      });
  }
  </code></pre>
  
  <p>and here's my express routes file: </p>
  
  <pre><code>router.get('/everything', function (req, res) {
      var q = User.example();
      var x = JSON.parse(q);
      console.log(x);
  });
  </code></pre>