Hi @Rishabh_Bisht,
Thanks for replying, the thing is that c++ code is not compilable, for that i followed the example you provided here https://www.mongodb.com/docs/languages/cpp/drivers/current/working-with-bson/ with operator <<, when i change this doc1 = doc1 << doc4; to doc1 = doc4; it compiles, however, since i am new dealing with MongoDB i guess from_json will do the job.