admin管理员组文章数量:1410697
with the following code I am getting this error:
SyntaxError: missing } after property list <shell>:3
Does anyone know what I did wrong? The curly braces seem balanced so I am wondering if I made a mistake somewhere else.
db.test.save(
{
"name":"John Doe"
"attribute":"false"
"num1":99
"num2":85
"num3"{
"n1":11
"n2":9
"n3":8
"n4":9
}
"num4"{
"m1":15
"m2":6
"m3":5
"m4":12
}
}
)
with the following code I am getting this error:
SyntaxError: missing } after property list <shell>:3
Does anyone know what I did wrong? The curly braces seem balanced so I am wondering if I made a mistake somewhere else.
db.test.save(
{
"name":"John Doe"
"attribute":"false"
"num1":99
"num2":85
"num3"{
"n1":11
"n2":9
"n3":8
"n4":9
}
"num4"{
"m1":15
"m2":6
"m3":5
"m4":12
}
}
)
Share
Improve this question
asked Feb 8, 2013 at 3:05
dspiegsdspiegs
5682 gold badges9 silver badges26 bronze badges
1 Answer
Reset to default 5Missing colons.
"num3":{
^
"num4":{
^
And also mas.
"name":"John Doe",
^
"attribute":"false",
^
"num3"{
"n1":11, //mas to separate these object properties too
"n2":9,
"n3":8,
"n4":9
},
^
//etc
This should execute:
{
"name":"John Doe",
"attribute":"false",
"num1":99,
"num2":85,
"num3":{
"n1":11,
"n2":9,
"n3":8,
"n4":9
},
"num4":{
"m1":15,
"m2":6,
"m3":5,
"m4":12
}
}
There are also some examples of valid document
s in the MongoDB update docs.
本文标签: javascriptError with mongodb Missing quotquot after property listStack Overflow
版权声明:本文标题:javascript - Error with mongodb. Missing "}" after property list - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744316036a2600268.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论