1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"name": "John Doe",
"age": 30,
"city": "New York",
"email": "johndoe@example.com",
"is_verified": true,
"tags": [
"developer",
"designer",
"musician"
],
"address": {
"street": "123 Main St",
"city": "New York",
"zipcode": "10001",
"country": "USA"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
new mongoose.Schema({
name: { type: string },
age: { type: number },
city: { type: string },
email: { type: string },
is_verified: { type: boolean },
tags: {type : [string]},
address: new mongoose.Schema({
street: { type: string },
city: { type: string },
zipcode: { type: string },
country: { type: string },
}),
})