Mongodb – Mongoose create is setting array to "undefined"
I am trying to insert a document to MongoDB using Mongoose in ES6. I have the following code to create the document: Passes.create( { passDate: '20147', invitedGuestPass: [{ residentId: new mongoose.Types.ObjectId(), residentFirstName: 'Jack', residentLastName: 'Smith', residentEmail: '[email protected]', invitedGuestId: new mongoose.Types.ObjectId(),…