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

183
Views
key value pairs as search parameter?

how can I pass somethinglike this (these objects are just simple data represenation)

{2: [test,test2]}

within the search query? With single data there is no problem because I can just use:

.com/search?id=2&value=test,test2

but what if I have two different ids with different values like:

{
   2: [test,test2],
   3: [test3]
}

How the query would look like then?

almost 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can use JSON.stringify() method. And later, on the server you can parse it back with JSON.parse() method.

const data = { 2: ['test', 'test2'], 3: ['test3'] };

const url_param = JSON.stringify(data);

...

const result = JSON.parse(url_param)
almost 4 years ago · Santiago Trujillo Report
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!