document 1:
{
_id: abcdef,
name: "foo",
time: [1234],
doc: [1234]
}
document 2:
{
_id: alexa,
name: "alexa",
time: [1234],
doc: [1234]
}
Expected output:
{
time[1234],
alexa[1234],
foo[1234]
}
I have multiple documents in MongoDB, I want to merge the document and make it one document.
Playground merge multiple documents into one.