Question: Im building a dynamic list of products which every product contains a "Product Type", im looping through each product but I need to set the selected option for an existing product
$.each(products.All(), function(index, product) {
for(p in productList) {
$( "#"+product.itemId+"_type" ).append($("<option/>", {
value: productList[g].value,
text: productList[g].label,
//Need to add something like if(productList[g].value == p.typeId) selected:true
}));
}