title: Adding custom field during find in Mongoose
body: <p>So I have next model:</p>
  
  <pre><code>const PostSchema = new Schema({
      name: String,
      likedBy: [{ type: mongoose.Schema.Types.ObjectId, ref: 'User' }]
  })
  </code></pre>
  
  <p>I also have middleware called <strong><em>isLoggedInOrNot</em></strong>, which populates req.user if there is authorization.</p>
  
  <p>So on index page, I want to find and return newest posts, and each one should have a custom field added <strong><em>didILiked</em></strong>. So what I want is something like this:</p>
  
  <pre><code>Post.find().select({ didILiked: { likedBy: req.user._id } }).sort('-createdAt').exec()
  </code></pre>
  
  <p>I know the above is not even valid, but just a demonstration of what I would like to accomplish.</p>
  
  <p>So let's say didILiked gets created (like virtual field, not stored in db), and it should be true/false or null if req.user is undefined.</p>
  
  <p>Is there a way to accomplish this?</p>