adspace


What is mongodb replica set?

Answer Posted / Satyendra Kumar

To define an array in a Mongoose schema, use the Array data type followed by the element's schema: const mySchema = new Schema({ /* other fields here */ items: [myItemSchema] }); This creates an array field named 'items', where each item conforms to the specified schema (myItemSchema).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to define array in mongoose schema?

86


How did mongodb get its name?

67


what is the command syntax for inserting a document?

69