I declared a mongoose schema with a Map field inside:
new mongoose.Schema(
{…
myMap: {
type: Map,
of: String
}
…})
When I now ask the database for a document from the collection with this schema, it returns this field as a normal Object.
As I read in the mongoose documentation, Maps are saved in MongoDB as BSONObjects. This is fine, but why does it returns me with e.g. a findOne() request this field always as Object and not as Map? Do I really have to parse it on my own or do I made any mistake?
Thanks in advance!