How to get a specific object from an array field with mongoose

Given a schema like this:

UserSchema = new Schema({
  name: String,
  donations: [
    {
      amount: Number,
      charity: {
        type: Schema.Types.ObjectId,
        ref: 'charity'
      }
    }
  ]
});

I have the (string) ids of a user and of a nonprofit and I want to get the amount the user donated. Im using this query with lodash:

User.findOne({
  _id: userId
}, function(err, user) {
  var amount = _.find(user.donations, {charity: charityId});
  console.log("the amount is: ", amount);
});

Here the amount returns undefined even though it shouldn't also im guessing i shouldn't have to use lodash. What's the right way to get to the amount donated given a specific userId and charityId?

This is pretty similar to the possible duplicate I linked to, as you can do this without using lodash as:

User.findOne({
  _id: userId,
  'donations.charity': charityId
}, {
  'donations.$': 1
}, function(err, user) {
  console.log("the amount is: ", user.donations[0].amount);
});