No puedo ordenar esto por fecha relevante. Necesito la fecha más reciente primero. ¿Podrías ayudarme? ¡Muchas gracias de antemano!
publications = [{ "publicationDate" : "12.05.2022", "relevantDate" : "01.06.2022", "title" : "Bücher", "type" : "allgemein" }, { "publicationDate" : "04.05.2022", "relevantDate" : "21.05.2022", "title" : "Videos", "type" : "allgemein" }, { "publicationDate" : "14.04.2022", "relevantDate" : "25.05.2022", "title" : "Musik", "type" : "allgemein" }]; publications.sort(function(a, b){ return new Date(a.relevantDate) - new Date(b.relevantDate); });