Insert Error in MongoDB

0

I did this:

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

    
asked by anonymous 13.06.2018 / 22:52

1 answer

3

I think the comma separator of hash items is missing. Try this:

> 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"
})
    
13.06.2018 / 22:56