I'm quite new to mongodb, hence I would like to know how the mongoose schema should look like when I need to add indexed items in an array.
Here is how I want the output to look like:
_id: some_id
users: Object
0: Array
0: some_user_id
1: some_user_id
2: some_user_id
This is the schema I tried to create, but I think I'm wrong here:
const mongoose = require('mongoose')
const timerSchema = mongoose.Schema({
users: [[]]
})
module.exports = timerSchema
Thank you in advance!
timerSchema.usersproperty to hold an array of arrays?