Answer the question
In order to leave comments, you need to log in
How to get data from linked documents?
Such a thing.
I return the list of salons
const salon = await Salon.find({$text: {$search: searchText, $caseSensitive: false}})
type: [{ type: Schema.Types.ObjectId, ref: 'salon_types' }],
salonType.findById() // типа так
Answer the question
In order to leave comments, you need to log in
https://mongoosejs.com/docs/populate.html#population
https://www.npmjs.com/package/mongoose-autopopulate
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question