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

225
Views
Looping through req query in node js

How to loop req query in Nodejs, the code doesn't work and is giving me an undefined or Nan output

Here is my code:

const express = require('express');
const app = express();
const catalyst = require('zcatalyst-sdk-node');
app.use(express.json()); // for parsing

app.get('/', async (req, res) => {
    const catalystApp = catalyst.initialize(req);

    console.log(req.query);

    for (let i = 0; i < req.query.quantity; i++) {
        console.log(req.query.appliance_deck_ + `${i}`); // OUTPUT: undefined0
        console.log(req.query.appliance_deck_ + i); // OUTPUT: NAN
    }
    
});

module.exports=app;

Thank you.

about 4 years ago · Santiago Gelvez
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!