Mongodb Insert Error

Asked

Viewed 26 times

0

I did that:

MongoDB Enterprise>db.Channels.insert({
... "ChannelCode" : "BT"
... "Name" : "Bartira"
... "Celphone" : "(11)971418418"
... "Endpoint" : "www.bartira.com.br"
... "TokenLogin" : "1234567890"
... "TokenLoginExpiration" : "2018-06-13T00:00:00.000Z"
... "Active" : "true"
... })

This error occurs:

2018-06-13T17:48:02.218-0300 E QUERY [thread1] Syntaxerror: Missing } after Property list @(shell):3:0

The key seems to be correct

1 answer

4


I believe the separation comma of the hash items is missing. Try it this way:

> db.Channels.insert({
  "ChannelCode" : "BT",
  "Name" : "Bartira",
  "Celphone" : "(11)971418418",
  "Endpoint" : "www.bartira.com.br",
  "TokenLogin" : "1234567890",
  "TokenLoginExpiration" : "2018-06-13T00:00:00.000Z",
  "Active" : "true"
})

Browser other questions tagged

You are not signed in. Login or sign up in order to post.