$.each(results['hide'], function(name, title) { $("#edit-field-service-sub-cat-value option[value=title]").hide(); $("#edit-field-service-sub-cat-value option[@value=title]").hide(); });