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

239
Views
Deserializing/parsing a 2d array (Axios/Express)

I'm making a get request similar to this:

axios.get('https://example.org/getJobs', { params: { salaries, ... } }); // ... represents more params

where salaries is an array of arrays, or ranges, that I use to filter the jobs returned. I can access it fine on req.query.salaries, but it arrives on the server in the following format:

[ '["0","20000"]', '["20000","30000"]', '["30000","40000"]' ]

I'm just wondering what the best way to parse this is?

*Edit: Just to be clear, the array is originally sent in this format: [['0', '20000'], ['20000', '30000'], ['30000', '40000']]

salaries logged just before calling axios.get():

(5) [Array(2), Array(2), Array(2), Array(2), Array(2)]
0: (2) ['0', '20000']
1: (2) ['20000', '30000']
2: (2) ['30000', '40000']
3: (2) ['40000', '50000']
4: (2) ['50000', '60000']
length: 5
[[Prototype]]: Array(0)
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!