Has can be seen in the picture, image if i choose two dropdown menus, i want to search only using two fields (filters in the querie) in Mongodb, or if i choose all, for example, i want to filter the querie to match the documents with all those fields.
In any dropdown above if i choose a field i´ll get a value. I want to use that value and the problem is the values that were not chosen will be part of my query. Meaning that all 6 drop down are gonna be variables to my queries and some of them aren’t choosed so the value would be undefined. How can i build a query with such variables?