insertOne() issue

I am connected to my mongo sandbox through the terminal. I can see the video database and use video works and show collections shows:
movieDetails
moviesScratch

When i try to use:
db.moviesScratch.insertOne({title: “test”, year: 1555, imdb: ”what”})

I receive:
uncaught exception: SyntaxError: illegal character :

@(shell):1:35

What am i don’t wrong?
Thanks

Your quotes on imdb value what is not proper
Use straight double quotes for both title and imdb.Don’t use inverted comma type quotes)

2 Likes

Thank you,Ramachandra_37567!

For anyone else: I wrote the “db.moviesScratch.insertOne({title: “test”, year: 1555, imdb: ”what”})” in notes on a mac and then copied and pasted. Going into keyboard settings -> text i changed double quotes into straight quotes and that solved the problem.

If writing in terminal, the quotes worked properly.