'How do I set up a array in schema with two objects and limit the array length
I just want to set up wherein my schema can store the list of an array of users about their name and key Here is the code.. I don't know if this is right or wrong..Can anyone help me with this? I just want to know how to setup my arrays because I can't find it in part of here in internet or maybe i'm just out of idea. Is this the right approach?
likes:{
type:Number,
max:100000
},
people:[
{key:{type:String},name:{type:String}},
{validate:1000}
]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
