Hi, I'd like to insert two documents into my database in my 'movieList' collection, but that's not how it works and I do not know why, I could do it from robomongo, but I want to do mongoimport --db movies --collection --movieList - file movies.json I get an error that my document starts with 'd' (Failed: error processing document # 1: invalid character 'd' looking for beginning of value), I thought it could be imported like this ...
db.getCollection("movieList").insertMany([
{"nombre": "Pirates of the Caribbean",
"cast": ["Leonardo Di Caprio", "Johnny Depp", "Jennifer Anniston"],
"director": {
"nombre": "Christopher nolan",
"contacto":[
{
"tipo": "personal",
"direccion": "calle isaac albeniz 15, Madrid"
},
{
"tipo": "oficina",
"direccion": "calle lagasca 67, Madrid"
}
]
},
"rating": 8,
"genero": ["Accion", "Aventuras"]
},
{
"nombre": "Pirates of the Caribbean",
"cast": ["Leonardo Di Caprio", "Johnny Depp", "Jennifer Anniston"],
"director": {
"nombre": "Christopher nolan",
"contacto":[
{
"tipo": "personal",
"direccion": "calle isaac albeniz 15, Madrid"
},
{
"tipo": "oficina",
"direccion": "calle lagasca 67, Madrid"
}
]
},
"rating": 8,
"genero": ["Accion", "Aventuras"]
}]);