Answer the question
In order to leave comments, you need to log in
How to properly organize the storage of the same type of information in MongoDB?
For example, there are such data structures:
{
key: string,
value1: string,
value2: string,
value3: string,
value4: string
}
{
_id: xxx,
key1: {
value1: string,
value2: string,
value3: string,
value4: string
},
key2: {
value1: string,
value2: string,
value3: string,
value4: string
},
key3: {
value1: string,
value2: string,
value3: string,
value4: string
},
key4: {
value1: string,
value2: string,
value3: string,
value4: string
}
}
{
_id: xxx,
array: [{
key: string,
value1: string,
value2: string,
value3: string,
value4: string
}, {
key: string,
value1: string,
value2: string,
value3: string,
value4: string
}, {
key: string,
value1: string,
value2: string,
value3: string,
value4: string
}, {
key: string,
value1: string,
value2: string,
value3: string,
value4: string
}]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question