如何将数据添加到邮递员

swa*_*ran 5 javascript postman

如果我想在下面的架构中添加一些数据:

'use strict';

var mongoose = require('mongoose')
, Schema = mongoose.Schema;
var notificationsSchema = new mongoose.Schema({
    notifyMessage                   : { 
            title                       : { type: String },
            des                         : { type: String }
        },
        notifier                        : { type: String },
        recipient                       : [{
            id                          : { type: String },
            status                      : {type:String,trim:true,enum:['read','unread']}
        }]
});

module.exports = mongoose.model('notification_tracker', notificationsSchema);
Run Code Online (Sandbox Code Playgroud)

我试过这种方式: 在此输入图像描述 在此输入图像描述

但它以这种方式结束了..

prt*_*ngo 2

选择原始单选按钮并确保将其设置为JSON(application/json),然后像这样粘贴或添加 JSON 对象

在此输入图像描述

{
  notifyMessage: {
    title: "",
    des: ""
  },
  notifier: "",
  recipient: [{
    id: "",
    status:""
  }, {
    id: "",
    status:""
  }]
}
Run Code Online (Sandbox Code Playgroud)

使用这种格式