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

209
Views
How can I remove a certain value in a flatmap?

This is the flatmap:

 const options = names.flatMap(
    (object) => object.name + " - " + object.size + "- " + object.category
  );

console.log(options):

enter image description here

If the object.category is equals to S-XL how can I not display its values? But if the object.category is equals too ft it will display the object.category ?Any help would be appreciated. Thank you

I'll be using the flatMap here:

<Autocomplete
        disablePortal
        isOptionEqualToValue={(option, value) => option?.label === value?.label}
        id="combo-box-demo"
        options={options}
        fullWidth
        value={value}
        onChange={onChange}
        renderInput={(params) => <TextField {...params} label="Products" />}
        required
      />
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

  const options = names.flatMap(
      (object) => 
               object.name + 
               " - " + 
              object.size + 
              `${object.category == "ft" ? "- " + object.category : ""}`
    );
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!