0

I'm new to MongoDB,Can someone provide MongoDB schema for the below data :

{ listData :

[

[ { title: 'test' } ],

[

{ listmessage: 'message 1' },

{ listmessage: 'message 2' },

{ listmessage: 'message 3' }

]

]

}

I've tried this below schema, but it's not working :

const listSchema = mongoose.Schema(

{ listData: [

[{title:{type:String}}],

[{listmessage :{type:String}}]

]

})

Am i doing something wrong ?

pavan
  • 1

0 Answers0