Questions tagged as 'mongodb'

1
answer

How to save data from a JSON consisting of arrays?

Hello. I have a JSON that has the following structure: { "_id": { "$oid": "3432fa43242" }, "posts": [{ "thread": { "uuid": "2911da", "url": "http://www.google.com", "site_full": "opiniaoenoticia.com.br",...
asked by 25.09.2016 / 22:51
1
answer

How to transform a JSON that contains an array of objects into a list of objects?

Good evening. I have the following JSON: { "_id": { "$oid": "3432fa43242" }, "posts": [{ "thread": { "uuid": "2911da", "url": "http://www.google.com", "site_full": "opiniaoenoticia.com.br", "site": "opiniaoenoticia.com....
asked by 26.09.2016 / 01:13
0
answers

How to update a list of documents in mongodb

I'm trying to update a list of objects look like this: var lista = [ { _id: 57ea29361b297553c99d702f, nome: 'Meu nome', __v: 0 }, { _id: 57ea29371b297553c99d7031, nome: 'Meu outro nome', __v: 0 } ] model.update({}, lista)...
asked by 27.09.2016 / 10:18
0
answers

Display items of a given ID using angular GET

I am doing a very basic forum where the user types the title, subject and description of the topic, and this one is sent to the mongo (I am also using the postman), with the help of the staff here in another topic, this part ja finalizei . In th...
asked by 12.08.2016 / 02:11
1
answer

Doubt about NodeJS + Mongo application structure at Digital Ocean

I started by using 1 machine at Digital Ocean instead of UOL Host. As I do not have much experience with the server configuration part, I have 1 doubt and I hope someone helps me: Scenario: 1) My application is running on Digital Ocean o...
asked by 15.08.2016 / 19:28
0
answers

Error handling PHP session in MongoDB

I am using a handler for php session where you save the session data in MongoDB. However, reloading the page in short intervals throws an error: "Failed to write session data (user)" and recommends checking the configuration of "session.save_pat...
asked by 28.06.2016 / 09:40
1
answer

How can I search for a property if I do not know its name?

In my database mongodb I am saving a document with the following structure: { "_id": "A/B", "Properties": { "Abandoned": { "TypeName": "int", "Name": "A/B/Abandoned", "Value": 2...
asked by 18.10.2016 / 17:03
1
answer

How to do a findOneAndUpdate in an array inside another array with Mongoose

I'm a beginner in Mongoose, I would like to make a change ( findOneAndUpdate ) in the second array address in the city field, I tried everything I knew and thank no one that can help. { _id: "573c5ed236c156cc2351d1ea", tit...
asked by 19.05.2016 / 20:48
1
answer

How to do an update in an array with MongoDB and Morphia?

I need to update an Ingredient in the ingredient list. Until then I just know how to update the entire JSON. How do I update only one item in the array? { "_id" : ObjectId("573c721f75fe72149c4d9987"), "className" : "br.com.teste.productdatas...
asked by 26.05.2016 / 20:33
0
answers

Mongodb db.loadServerScripts (); fatal error missing} after property list nofile_b: 2

I am trying to run the command db.loadServerScripts(); but it is returning the following error: SyntaxError: missing } after property list nofile_b:2     
asked by 30.03.2016 / 16:43