Json IE problem

Json IE problem

I am using json to receive data. Now I have tested with all browsers, working fine except IE. In ie I am getting undefined null object error. can any one help me with this please? here is my code

  1. function exchangeIdentifier() {
  2.        $.getJSON('exchangedetail.php', {countryName:$('#countryName').val()}, function(data) {
  3.         var select = $('#exchange');
  4.         var options = select.attr('options');
  5.         $('option', select).remove();
  6.         $.each(data, function(index, array) {
  7.             options[options.length] = new Option(array['exchange']);
  8.         });
  9.    });
  10. }
  11. function equityIdentifer() {
  12.        $.getJSON('equitydetail.php', {exchange:$('#exchange ').val()}, function(data) {
  13.         var select = $('#typeo');
  14.         var options = select.attr('options');
  15.         $('option', select).remove();
  16.         $.each(data, function(index, array) {
  17.             options[options.length] = new Option(array['eqtype']);
  18.         });
  19.    });
  20. }