for(var i = 0 ; i < objects.length ; i++){
if(type == "user")
{ // normal mathematical calculations
// result.push(objects[i])
}
else if( type == "group"){
// Here i need a query "group" model
// find group related stuffs
// and then push to result
// result.push(objects[i])
}
}
since group is taking time for querying mongoose schema..so when the objects[i] comes to group section it shows undefined..i need to make sure objects[i] for group executes and the control should go to
user block
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…