chris-ELM
6/25/2014 - 3:46 PM

Removes duplicate node elements from xml in js

Removes duplicate node elements from xml in js

function removeDuplates(){
                var dup = {};
                $('a').each(function() {
                    var txt = $(this).text();
                    if (dup[txt])
                        $(this).remove();
                    else
                        dup[txt] = true;
                });
            }