let say, i have some data that contain state (country), province, and year, and the conditions, i will try to explain with this below:
state_a: {
province: {
name: 'prov_1',
conditions: {
year: 2019,
condition: 'normal'
},
conditions: {
year: 2020,
condition: 'not normal'
}
},
province: {
name: 'prov_b',
conditions: {
year: 2019,
condition: 'not normal'
},
conditions: {
year: 2020,
condition: 'not normal'
}
}
},
state_b: ......... etc
actually, i don't know how to explain it :D, i hope that code could explain what i mean. i want to create model in mongoose. could you help me, guys?