Tengo un problema con la clasificación de datos con caracteres especiales. ¿Puede alguien ayudarme si este problema? Estoy codificando en 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);