Make projection on output from new mongo version into the old one
The first versions of mongo db returned a body like this when we inserted an entity: { code: msg: result:[ //Entity info ] }
After migrating to new versions of mongodb, this has changed and now the outcome is like this: { "code": 200, "desc": "ok", "result": [ { "result": { "ok": 1, "n": 1 }, "ops": [ { "entityname": "Box", "entitydescription": "A box", "type": "entity", "owner": "jgarcia@atos.net", "_id": "5979abd50e71943a802576a6" } ], "insertedCount": 1, "insertedIds": [ "5979abd50e71943a802576a6" ] } ] }
It's important to adapt this output to the previous one to avoid errors between the code and the different components, SDKs, or working apps that are currently running.