I know this question is not course related. Hopefully someone can help me on this. Thanks in advance.
I have a students collection which has thousand of documents. It looks like this:
{
name: “James bond”,
class: “A1”,
math: 95,
english: 90,
social: 80
}
I’d like to modify all the documents which would look like:
{
name: “James bond”,
class: “A1”,
exam: {
math: 95,
english: 90,
social: 80
}
}
Also, If I wonder to get the total score of each course by class in other collection, like:
{
class: “A1”,
math: 2865,
english: 2973,
social: 2643
}
I know there is aggregation for doing this. But I prefer to use batch processing.
Thanks a lot.
Richard