Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose populate not working

const members = await subtable.find({ party: req.body.party }).populate({
    path: "user_id", //subtable field which refers to your main table
    select: "fname lname",
  });
 
PREVIOUS NEXT
Tagged: #mongoose #populate #working
ADD COMMENT
Topic
Name
7+1 =