So I have 2 arrays
let knownOrder = ["Headache level", "Headache side", "Nausea", "Aura", "Phonophobia" ,"Photophobia"]
let tmpArray = ["Aura","Headache side","Photophobia"]
- Note - The tmpArray can include all or some of the 'knownOrder' array objects.
And now what i want to do is to sort the 'tmpArray' in order based on the 'knownOrder'.
What can I do?