I have the following three collections in MongoDB
fd2k10sample
fd2k16sample
fd2ksample
the documents in each of them are of same structure so no structure problem as below:
fd2ksample
id cat1 cat2 cat3 cat4
1 doza moza goza hoza
2 beta geta jeta leta
3 huggy muggy guggy luggy
fd2k10sample
id cat1 cat2 cat3 cat4
1 prizzy mizzy tizzy hizzy
2 chuta buta guta tuta
3 befer lefer gefer tefer
fd2k16sample
id cat1 cat2 cat3 cat4
1 poopa doopa hoopa loopa
2 nijjy pijjy hijjy tijjy
3 ufha puhfa duhfa tuhfa
How do I combine them like so:
fd2kfullsample
id cat1 cat2 cat3 cat4
1 doza moza goza hoza
2 beta geta jeta leta
3 huggy muggy guggy luggy
1 poopa doopa hoopa loopa
2 nijjy pijjy hijjy tijjy
3 ufha puhfa duhfa tuhfa
1 poopa doopa hoopa loopa
2 nijjy pijjy hijjy tijjy
3 ufha puhfa duhfa tuhfa
How to do this with just few commands in MongoDB version 3.4?
The answer given in this solution is about Merging the Data Documents whereas I want to combine the data documents not merge them. The below is not a duplicate but a different question altogether: MongoDB: Combine data from multiple collections into one..how?