
    }

    document.getElementById('rescounter').innerText = `${ascindex} Results`;

}

function sanitizeJSON(obj) {
    if (typeof obj === 'string') {
        return obj.toLowerCase().replace(/[!?(){}\[\]:;-]/g, ' ').trim();
    } else if (Array.isArray(obj)) {
        return obj.map(sanitizeJSON);
    } else if (typeof obj === 'object' && obj !== null) {
        return Object.fromEntries(
            Object.entries(obj).map(([key, value]) => [key, sanitizeJSON(value)])
        );
    }
 