Answers for "select item in populate mongoose"

CSS
2

select item in populate mongoose

Model
.find(query)
.populate({
  path: 'key_with_ref', 
  select: ['field_1', 'field_2']
});
Posted by: Guest on November-17-2021

Browse Popular Code Answers by Language