I have a variable "jobs" that contains an array of objects that looks something like this:
var jobs = [
{
name: "Accountant"
score: 0,
}, {
name: "Actor"
score: 0,
}, {
name: "Actuary"
score: 0
}]
I am needing to save this jobs variable data to MongoDB.
What is the correct way to store data of this type with mongo? I've been attempting to use this set up without luck so far:
quizData: {
type: mongoose.Schema.Types.ObjectId,
ref: "quizData"
},