Widget:KeywordSearch: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 74: | Line 74: | ||
runQueries(obj); | runQueries(obj); | ||
} else { | } else { | ||
removeDuplicates(obj); | |||
} | } | ||
}); | }); | ||
} | } | ||
function removeDuplicates(obj){ | |||
for(var i=0;i<obj.questionListAll.length;i++){ | |||
$.each(obj.questionListAll, function(index, value){ | |||
if(obj.questionListAll[i] === value){ | |||
obj.questionListAll.splice(index, 1); | |||
return false; | |||
} | |||
} | |||
} | |||
console.log(obj.questionListAll); | |||
} | |||
}); | }); | ||