node.js - Query aggregate match with filters specified in document -



node.js - Query aggregate match with filters specified in document -

i have document this:

{ "name" : "henrik", "info" : { "phone" : "040*" } }

the input query url?phone=040123456

var query = req.query; db.people.aggregate([{ $match : { "info.phone" : query['url'] // match 040* } }])

in case want match input filter defined in database.

is possible?

node.js mongodb

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -