error missing after property list

Query mongo shell throws SyntaxError: missing } after property list

When you are trying to insert document in MongoDB collection you might see this SyntaxError: missing } after property list.

Problem Statement

Let  say you are trying to insert the following document in the collection called ‘posts’ using the following mongo shell command.


From the above output, we see there is a syntax error at line number 4 and column number 0 and it says the property list is not terminated properly. Look at 3rd line.

There is no “comma” after this property list item in the document or data object that you are trying to insert, try adding comma to solve “syntax error missing } after property list”. Hope it  helped.

Related Posts


Leave a Reply

Notify of