This code takes an object OR an array of objects and maps the `_id` property to `id`. Found no other out-of -the box way to do it from MongoDB. Both the `object` (when it is not an array) and `values` array  (containing always an array of objets from mongo) should be defined.