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

308
Views
How to sort data that contains special characters. I want to exclude the special characters. React Native

I am having an issue with sorting data with special characters. Can someone help me if this issue? I am coding in React Native

  const sorted = response.data.items.sort(function (a, b) {
          var textA = a.title.replace(/[^a-zA-Z0-9 ]/g, '').toUpperCase();
          var textB = b.title.replace(/[^a-zA-Z0-9 ]/g, '').toUpperCase();
          if (sortAscDesc) return textA < textB ? -1 : textA > textB ? 1 : 0;
          if (sortAscDesc === false) return textA > textB ? -1 : textA < textB ? 1 : 0; //prettier-ignore
        });
        setApiData(sorted);

enter image description here

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!