95994/how-do-i-perform-an-id-array-query-in-mongoose
Let's say I have a model called User. I have an array with object Ids.
I want to get all User records that "intersect" with the array of Ids that I have.
User.find({ records with IDS IN [3225, 623423, 6645345] }, function....
Hello @kartik,
Here is a mongoosey way to use the $in operator.
User.find() .where('fb.id') .in([3225, 623423, 6645345]) .exec(function (err, records) { //make magic happen });
Hope it helps!!
Hello @kartik, The easiest way I have found ...READ MORE
Hello @kartik, The built-in module querystring is what you're looking ...READ MORE
Hello @kartik, To update package.json in addition to ...READ MORE
Hello @kartik, To make the render engine accept ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
Hello, This is simple you just need to ...READ MORE
Hey @kartik, Named routing is another amazing feature of ...READ MORE
Hello @kartik, You didn't specify whether you were ...READ MORE
Hello @kartik, You require any js file,so you just ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.