I am working with two arrays, one containing numbers and the other containing objects of the same length:
var a = [2, 0, 1], b = [obj1, obj2, obj3];
My goal is to rearrange the items in array 'b' based on the positions of the numbers in array 'a'.
If possible, I would prefer a solution using jQuery.
Any suggestions on the most efficient way to achieve this?
Appreciate any help. Thank you