thread1 SyntaxError missing after property – E QUERY thread1 SyntaxError missing after property id @ shell 1 60 – E QUERY [thread1] SyntaxError: missing : after property id @(shell):1:60 — If you are using Mongo DB and using its shell to insert collection and getting below exception:
2020-03-13T07:09:00.448+0200 E QUERY [thread1] SyntaxError: missing : after property id @(shell):1:184
Answer: If collection is having inner documents then will have to use quotes on them. Also, use quotes for querying String values
In my case below was the document giving error:
insert({
name: "New York",
population: 8406000,
last_census: ISODate("2012-07-31"),
famous_for: [ "statue of liberty", “broadway”, "food" ],
mayor : {
name : “Bill de Blasio",
party : "D"}
So I corrected below shows in bold:
For more information you can use Mongo DB tutorial