Arai Arai - 1 year ago 79
Node.js Question

How to find a document using nested value MongoDB

I have a Json like this:

"lugarNacimiento":"Venezuela, Maracaibo",
"direccion":"San Carlos",


"ocupacion":"Programador Web",


I need to query these kinds of documents with nodeJS using "cedula" to find them

<< in this case

I tried using this but it doesn't fetch the document

var ced = 21076754;

any suggestions?

Answer Source

Your result is a string (See the quotes).

Change your query to:

var ced = "21076754";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download