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

110
Views
How to return a record that contains bundle.inputData.name in JavaScript?

I'm trying this and receive all records. I only want to return the ones that match bundle.inputData.name

let options = {
  url: 'hidden',
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'X-ACCESS-TOKEN': bundle.authData.access_token
  },
  params: {
    'name': bundle.inputData.name,
    'access_token': bundle.authData.access_token
  }
}

return z.request(options)
  .then((response) => {
    response.throwForStatus();
    const results = response.json;

    return results;
  });

Here's a sample response, and I'd like to know how to pull Project 2:

{
  "id": 10001,
  "name": "Project 1",
  "mediaCount": 2,
},
{
  "id": 10002,
  "name": "Project 2",
  "mediaCount": 2,
},
{
  "id": 10003,
  "name": "Project 3",
  "mediaCount": 2,
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

i think you want to get only name so in this case you can use map() function pretty cool let newResponse=response.map((item,index)=>{ return item.name;}) and it will fine.

and if you want only one record so you can

let newResponse=response.map((item,index)=>{ if(item.name=="project2"){return item}});
about 4 years ago · Juan Pablo Isaza 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!