Using this code...
var a = [\'volvo\',\'random data\']; var b = [\'random data\']; var unique = $.grep(a, function(element) { return $.inArray(element, b
This should probably work:
var positions = []; for(var i=0;i
So your final array would be something like:
var positions = [[0,2],[1],[3]...] //implies a[0] == b[0],b[2], a[1] == b[1] and so on.
Hope it helps