> No  language's unique array method that I have ever used drills down
> a  multi-dimensional array and compares it's elements to elements in
> the  siblings  of it's parents and friend's cousin's dog like you're
> trying to do :)

I agree. 

And  yet  there  *is* one webby language that is specifically designed
for  DOM hierarchies, and can do duplicate detection: XPATH. And since
Penter's  array  happens  to  be  a representation of a DOM context, I
present…

Detect duplicate elements using XPATH: http://jsfiddle.net/UfbX4/
"An  elaborate answer to to a question on the Moo list about detecting
duplicate values in multidimensional arrays. The OP was speaking of an
array  built  from  a  DOM  tree.  Here,  I demonstrate that XPATH has
built-in  ability to compare across the entirety of a DOM tree and can
remove duplicates across subtrees/cousins."

-- S.

Reply via email to