I have this structure
I want to know if through a query I could bring all the products that I have, I mean: put 'Cesar' and bring me all the products. And how would it be?
I have this structure
I want to know if through a query I could bring all the products that I have, I mean: put 'Cesar' and bring me all the products. And how would it be?
If you are asking for a top-level property (in this case " p_nombre
") it is as simple as doing
db.restaurants.find( { "p_nombre": "cesar" } )
This is simply a equality operator