Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
I want to use a dynamic variable off a a"submit or "click" from my "/" page as a filter in mongo find() server javascript file
const products = await db.getDb().collection('products').find({ "category": "dolls"}).toArray(); 

the "dolls" obviously works as it's hardwired. I tried setting a global variable (global.sortType= "owls") in app.js which also works. My issue is how to change such a global variable or create a variable by customer choice. I've tried a middleware js file stripping the both data-category value, body value from a POST of the as a "click" and a "submit" of a form to no avail.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!