我正在尝试将sub-id添加到我的数组元素中,但是当我尝试使用Robomongo保存此对象时出现错误:
{
"_id": ObjectId("540098e2c9502ce88820bfc3"),
"foo": "bar",
"objects": [
{
"_id": new ObjectId(),
"name": "a"
},
{
"_id": new ObjectId(),
"name": "b"
}
]
}
错误:
"new" keyword not followed by Date constructor.
我做错了什么?