var itemsArray = [ ['Anne', 'b'], ['Bob', 'a'], ['Henry', 'c'], ['Andrew', 'a'], ['Jason', 'a'], ['Thomas', 'c'] ]; var sortingArr = [ 'b', 'c', 'a' ]; itemsArray.sort(function(a, b){ return sortingArr.indexOf(a[1]) - sortingArr.indexOf(b[1]); }); console.log(itemsArray);