<#--de-duplicate--> Array.prototype.unique = function () { var res = []; var json = {}; for (var i = 0; i < this.length; i++) { if (!json[this[i]]) { //json does not contain the first value, and put it into json, if it is included, jump out res.push(this[i]); //The value that does not contain is put into res json[this[i]] = 1; // } } return res; } datas.unique()