If your data is actually arrays of integers, you could do it like this
// ES6
let data = [[1, 2], [2, 1], [3, 2, 2], [2], [2, 1, 3], [2, 2, 3]];
// non-mutating sort function
function sort(x) { let y = x.slice(0); y.sort(); return y; }
let final = data.map(x => JSON.stringify(sort(x))).reduce((res, x) =>
res.indexOf(x) === -1 ? res.concat(x) : res
, []).map(JSON.parse);
console.log(data);
console.log(final);
// [[1,2],[2,1],[3,2,2],[2],[2,1,3],[2,2,3]]
// [[1,2],[2,2,3],[2],[1,2,3]]
Notice that my solution does not mutate your input data unnecessarily (like the other solutions provided here)
If you need the ES5 code, here you go
// ES5
var data = [[1, 2], [2, 1], [3, 2, 2], [2], [2, 1, 3], [2, 2, 3]];
// non-mutating sort function
function sort(x) {
var y = x.slice(0);y.sort();return y;
}
var final = data.map(function (x) {
return JSON.stringify(sort(x));
}).reduce(function (res, x) {
return res.indexOf(x) === -1 ? res.concat(x) : res;
}, []).map(JSON.parse);
console.log(data);
console.log(final);
// [[1,2],[2,1],[3,2,2],[2],[2,1,3],[2,2,3]]
// [[1,2],[2,2,3],[2],[1,2,3]]