I have an array, and I'd like to show ONLY the duplicates.
Array = {1,3,2,1,4,1,4}
It would return back only 1 and 4.
I know this code works for getting rid of duplicates -
function RemDups(byVal anArray)
dim d, item, thekeys
set d = CreateObject("Scripting.Dictionary")
d.removeall
d.CompareMode = 0
for each item in anArray
if not d.Exists(item) then d.Add item, "1"
next
thekeys = d.keys
set d = nothing
RemDups = thekeys
end function
Question
coolant
I have an array, and I'd like to show ONLY the duplicates.
Array = {1,3,2,1,4,1,4}
It would return back only 1 and 4.
I know this code works for getting rid of duplicates -
Thanks for the help! :woot:
Link to comment
https://www.neowin.net/forum/topic/569649-classic-asp-only-show-duplicates-from-array/Share on other sites
1 answer to this question
Recommended Posts