i hava one 2d Array
Array1(0,A)
Array1(0,AC)
Array1(0,A) <--
Array1(0,AB)
Array1(1,CCC)
Array1(1,CCC)<--
Array1(1,ACC)
Array1(1,ABC)
<s/pre>
Expected 2d Array Like This (<--) this values are Removed after createing new Array
<pre>
Array2(0,A)
Array2(0,AB)
Array2(0,ABC)
Array2(1,CCC)
Array2(1,ACC)
Array2(1,ABC)
<s/pre>
For Single Array i am using
<pre>
Dim aStudents : aStudents = Array("Arup", "John", "Mike", "John", "Lisa", "Arup")
WScript.Echo Join(aStudents)
Dim aUniqStudents : aUniqStudents = uniqFE(aStudents)
WScript.Echo Join(aUniqStudents)
' returns an array of the unique items in for-each-able collection fex
Function uniqFE(fex)
Dim dicTemp : Set dicTemp = CreateObject("Scripting.Dictionary")
Dim xItem
For Each xItem In fex
dicTemp(xItem) = 0
Next
uniqFE = dicTemp.Keys()
End Function
when i use above logic apply on 2d Array its give me unique items but its given me value like this
Array1(0,A)
Array1(0,AC)
Array1(0,AB)
Array1(0,CCC)
Array1(0,ACC)
Array1(0,ABC)
index "1" will be remove in Dictionary