Using $where on value nested in object

11 views Asked by At

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?

0

There are 0 answers