I can't seem to figure out how to use the $.unique(array) function in JQuery. What I am trying to do is check the XML file to see what the range of home sizes is. The result will go into a list, but if there are duplicate items, I'd like to remove these.

A subset of XML Doc
Code:
<dimensions>
<bed>3</bed> <bath>2</bath> <area>1000</area>
</dimensions>
This line loops through XML and builds array "parentOption":
Code:
$(xml).find("bed").each(function(xml){
parentOption.push($(this).text() + " bedroom " + $(this).siblings('bath').text() + " bathroom " );
});
Not sure if I'm using this function correctly:
Code:
newArray = $.unique(parentOption);
Loop through array and display items to menu:
Code:
$.each(newArray, function(n, val){
var htmlOutput = "<option id='" + val + "' value='" + val + "'> " + val + " </option>"; $('#parentMenu').append(htmlOutput);
});