var keyMap = { deviceUid: "id", deviceType: "typeName", deviceCode: "code", deviceName: "name", deviceStatus: "status" }; for (var i = 0; i < data.confList.length; i++) { var obj = data.confList[i]; for
function isRepeat(arr) { var hash = {}; for(var i in arr) { if(hash[arr[i]]) return true; hash[arr[i]] = true; } return false; } var a = [1,2,34,5,1] console.log(isRepeat(a))