I have started a small project on node.js with MongoDB and have implemented some routes and controllers, but i am having problems with one controller that is used to do a search on attributes.
The Controllers to be implemneted is a GET and can contain or not a query
My documets contains 3 attributes (2 arrays of string and string), and i need to check if the atribute contains a certain word .
The query can look up on one atribute (for exemple only name) or on and all 3.
If the query is not present, it should return just all the documents.
I have attached the sample of my code, and a small sample of JSON for documnt.
Have 2 years experience working with Node.js. It's both the controller and route logic which can be modified in order to achieve you goal. Will finish the job ASAP.