ScriptS
Reactiflux4y ago
3 replies
Script

✅ – Script – 21-27 Dec 11

gig returns an object
inside that object lies
proposals
which is an array of objects
in each object in the
proposals
array contain a user id

I am trying to populate the user's object in each of the objects in the
proposals
array, how do I achieve that?|
#mongoDb
  const gig = await Gig.findById(req.gigId)
    .populate("proposals")
    .then(async (res) => { })
Was this page helpful?