How to do a query using dot( . ) through Mongoose in Node.js and How to add an empty array
问题 I have the following schema: var userSchema = new Schema({ userID: Number, userName: String, userEmail: String, teams:Array, socialMedias: { fbUID: String, googleUID: String, twitter: String } }); First, How can I add an empty array? Is it right the way I am doing in the following? teams:{}, Second, I am trying to do a query using Mongoose in my Node.js but I am getting an error in the dot ('.'): This is my document I am saving: var user = new users({ userID: id, //give the id of the next