I have 2 array. I want to sort only first array and the second array should be shorted on the base of first array.
Before sorting:
arrTexts = ["Company", "Department", "Account"];
arrValue = ["nameCompany", "department", "account"];
Should be like this after shorting:
arrTexts = ["Account", "Company", "Department"];
arrValue = ["account", "nameCompany", "department"];
I know sorting by arrTexts.sort();
But it is not so useful in above case.
Please not array length can be 300+. So, performance(sorting speed) also maters.
Can anybody please suggest me?