Mongodb find docs without associated doc -


i have mongo database users collection , profile collection. need find users not have profile. docs associated email address.

db.user.find().foreach(function(o) {     if(db.profile.find( { email: o.email } ).length() == 0) {         print(o.email);     }; }) 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -