I am trying to run the below code:
Ticket.find({
$where: function() { return this.price <= this.refunds.minimumPrice}
})
but mongo won't recognise this.refunds.minimumPrice.
How do I access values that are nested in objects in my Schema using $where?