Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

nested json schema mongoose

var mongoose =require('mongoose');
var Schema = mongoose.Schema;

var msg = new Schema({
  messageType: String,
  timestamp: Number,
  messagestatus: String
});

var standardmessage = new Schema({
  id: Number,
  name: String,
  type: String,
  message: [msg]
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nested #json #schema #mongoose
ADD COMMENT
Topic
Name
6+7 =