Skip to main content
1 of 2
M J
  • 3k
  • 4
  • 26
  • 36

The JSON Format:

[{ "org_name": "Asset Management" }, { "org_name": "Debt Equity Foreign services" }, { "org_name": "Credit Services" }] 

And the Jquery to populate the values to the Dropdown on ajax success:

success: function(json) { var options = []; $('#org_category').html(''); // Set the Dropdown as Blank before new Data options.push('<option>-- Select Category --</option>'); $.each(JSON.parse(json), function(i, item) { options.push($('<option/>', { value: item.org_name, text: item.org_name })); }); $('#org_category').append(options); // Set the Values to Dropdown } 
M J
  • 3k
  • 4
  • 26
  • 36