我正在尝试插入数据,但不幸的是,我不断收到此错误,因为它们是属性列表之后缺少花括号的原因
db.students.insert([
{ "role_num":1, "first_name":"Adilf", "last_name": "Adli", "marks":97},
{ "role_num":2,first_name:"Adil, "last_name": "Adl, "marks":93},
{ "role_num":3, "first_name":"Adi", "last_name": "Ad", "marks":89},
{ "role_num":4, "first_name":"Bonde", "last_name": "Nome", "marks":78},
{ "role_num":5, "first_name":"Bin", "last_name": "Lined", "marks":67}
]);
上面是我的插入语句
答案 0 :(得分:2)
尝试一下:
db.students.insert([
{ "role_num":1, "first_name":"Adilf", "last_name": "Adli", "marks":97},
{ "role_num":2, "first_name":"Adil", "last_name": "Adl", "marks":93},
{ "role_num":3, "first_name":"Adi", "last_name": "Ad", "marks":89},
{ "role_num":4, "first_name":"Bonde", "last_name": "Nome", "marks":78},
{ "role_num":5, "first_name":"Bin", "last_name": "Lined", "marks":67}
]);