I am new myself, but it seems this question hasn’t been closed for 11 days so maybe the previous answer wasn’t clear enough (understandably, it seems a bit bare-bones for a beginner)
I think what Steeve meant to say may be something along the lines of this:
question: {
type: String,
required: true,
},
images:{
[
{
type: String,
required: true,
VotesType: Number --> see if you really need this - the votes are always going to be a number, no?
VotesDefault: 0,
},
{
type: String,
required: true,
votes: --> Alternative option for the votes
{
type: Number,
default: 0,
}
}
]
}
I am probably not doing this right, but I’m trying to give an example using the idea that Steeve put forward according to what I know… which is just about nothing, but I know how JSON works, so I hope this helps you at least in finding a new route to try things. Basically the idea I got from his post was “make an array of the images and put the votes inside of that”.