Multiple Inputs in ne mongoose method

Viewed 138

I have users collection and I would like to get all users where status doesn't equal 'deleted' or 'pending'

I tried this

users.find().where('status').ne('deleted').where('status').ne('pending')

but it doesn't work.

I also tried this

users.find().where('status').ne(['deleted','pending'])

Also doesn't work.

How would I accomplish it?

I know it can be accomplished using a nested query string, but I want a way with the help of these query methods.

1 Answers
Related