I have these three array :
let codesArray = ["de_DE", "en_US", "en-GB", "es_ES"]
let localesArray = ["Deutsch", "English", "English UK", "Español"]
let internationalsArray = ["German", "English", "British English", "Spanish"]
I would like to sort the internationalsArray and sort the others based on internationalsArray, so that I will obtain :
codesArraySorted = [ "en-GB", "en_US", "de_DE", "es_ES"]
localesArraySorted = [ "English UK", "English", "Deutsch", "Español"]
internationalsArraySorted = ["British English", "English", "German", "Spanish"]
I tried with sort(), isOrderedBefore but no success.
Can you give me an idea ?
Thanks a lot !