Answer the question
In order to leave comments, you need to log in
How to display custom field by _id from MongoDB in React?
There is an application on the MERN stack. It describes such a model for MongoDB
const Master = new Schema({
master_name: { type: String, required: true },
rating: { type: Number, default: 0},
city: { type: ObjectId, ref: 'City' }
});
const City = new Schema({
city_name: { type: String, required: true, unique: true }
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question