$("#categoryId option[value='"+ data.category_id +"']").attr("selected",
true
);$('#categoryId option:contains(' + data.category_name + ')').each(function(){
f ($(this).text() == data.category_name) {
$(this).attr('selected', true);
}
});