我的貓鼬模式是:如何在MongooseJS中將字段設置爲JSON?
var Schema = new Schema({
code: String,
type: String,
people:{}
}
和數據項是:
people :
{
"id":"2342423",
"name":"John"
},
{
"id":"1231231",
"name":"Marry"
}
當我寫:
var obj = new Schema({
people:people});
obj.people是{}。我錯在哪裏?
人無效json – mindandmedia 2013-03-01 15:14:40